/*
 * Licensed to the Apache Software Foundation (ASF) under one
 * or more contributor license agreements.  See the NOTICE file
 * distributed with this work for additional information
 * regarding copyright ownership.  The ASF licenses this file
 * to you under the Apache License, Version 2.0 (the
 * "License"); you may not use this file except in compliance
 * with the License.  You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing,
 * software distributed under the License is distributed on an
 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 * KIND, either express or implied.  See the License for the
 * specific language governing permissions and limitations
 * under the License.
 */
// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: filechannel.proto

package org.apache.flume.channel.file.proto;

public final class ProtosFactory {
  private ProtosFactory() {}
  public static void registerAllExtensions(
      com.google.protobuf.ExtensionRegistry registry) {
  }
  public interface CheckpointOrBuilder
      extends com.google.protobuf.MessageOrBuilder {

    // required sfixed32 version = 1;
    boolean hasVersion();
    int getVersion();

    // required sfixed64 writeOrderID = 2;
    boolean hasWriteOrderID();
    long getWriteOrderID();

    // required sfixed32 queueSize = 3;
    boolean hasQueueSize();
    int getQueueSize();

    // required sfixed32 queueHead = 4;
    boolean hasQueueHead();
    int getQueueHead();

    // repeated .ActiveLog activeLogs = 5;
    java.util.List<org.apache.flume.channel.file.proto.ProtosFactory.ActiveLog>
        getActiveLogsList();
    org.apache.flume.channel.file.proto.ProtosFactory.ActiveLog getActiveLogs(int index);
    int getActiveLogsCount();
    java.util.List<? extends org.apache.flume.channel.file.proto.ProtosFactory.ActiveLogOrBuilder>
        getActiveLogsOrBuilderList();
    org.apache.flume.channel.file.proto.ProtosFactory.ActiveLogOrBuilder getActiveLogsOrBuilder(
        int index);
  }
  public static final class Checkpoint extends
      com.google.protobuf.GeneratedMessage
      implements CheckpointOrBuilder {
    // Use Checkpoint.newBuilder() to construct.
    private Checkpoint(Builder builder) {
      super(builder);
    }
    private Checkpoint(boolean noInit) {}

    private static final Checkpoint defaultInstance;
    public static Checkpoint getDefaultInstance() {
      return defaultInstance;
    }

    public Checkpoint getDefaultInstanceForType() {
      return defaultInstance;
    }

    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return org.apache.flume.channel.file.proto.ProtosFactory.internal_static_Checkpoint_descriptor;
    }

    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return org.apache.flume.channel.file.proto.ProtosFactory.internal_static_Checkpoint_fieldAccessorTable;
    }

    private int bitField0_;
    // required sfixed32 version = 1;
    public static final int VERSION_FIELD_NUMBER = 1;
    private int version_;
    public boolean hasVersion() {
      return ((bitField0_ & 0x00000001) == 0x00000001);
    }
    public int getVersion() {
      return version_;
    }

    // required sfixed64 writeOrderID = 2;
    public static final int WRITEORDERID_FIELD_NUMBER = 2;
    private long writeOrderID_;
    public boolean hasWriteOrderID() {
      return ((bitField0_ & 0x00000002) == 0x00000002);
    }
    public long getWriteOrderID() {
      return writeOrderID_;
    }

    // required sfixed32 queueSize = 3;
    public static final int QUEUESIZE_FIELD_NUMBER = 3;
    private int queueSize_;
    public boolean hasQueueSize() {
      return ((bitField0_ & 0x00000004) == 0x00000004);
    }
    public int getQueueSize() {
      return queueSize_;
    }

    // required sfixed32 queueHead = 4;
    public static final int QUEUEHEAD_FIELD_NUMBER = 4;
    private int queueHead_;
    public boolean hasQueueHead() {
      return ((bitField0_ & 0x00000008) == 0x00000008);
    }
    public int getQueueHead() {
      return queueHead_;
    }

    // repeated .ActiveLog activeLogs = 5;
    public static final int ACTIVELOGS_FIELD_NUMBER = 5;
    private java.util.List<org.apache.flume.channel.file.proto.ProtosFactory.ActiveLog> activeLogs_;
    public java.util.List<org.apache.flume.channel.file.proto.ProtosFactory.ActiveLog> getActiveLogsList() {
      return activeLogs_;
    }
    public java.util.List<? extends org.apache.flume.channel.file.proto.ProtosFactory.ActiveLogOrBuilder>
        getActiveLogsOrBuilderList() {
      return activeLogs_;
    }
    public int getActiveLogsCount() {
      return activeLogs_.size();
    }
    public org.apache.flume.channel.file.proto.ProtosFactory.ActiveLog getActiveLogs(int index) {
      return activeLogs_.get(index);
    }
    public org.apache.flume.channel.file.proto.ProtosFactory.ActiveLogOrBuilder getActiveLogsOrBuilder(
        int index) {
      return activeLogs_.get(index);
    }

    private void initFields() {
      version_ = 0;
      writeOrderID_ = 0L;
      queueSize_ = 0;
      queueHead_ = 0;
      activeLogs_ = java.util.Collections.emptyList();
    }
    private byte memoizedIsInitialized = -1;
    public final boolean isInitialized() {
      byte isInitialized = memoizedIsInitialized;
      if (isInitialized != -1) return isInitialized == 1;

      if (!hasVersion()) {
        memoizedIsInitialized = 0;
        return false;
      }
      if (!hasWriteOrderID()) {
        memoizedIsInitialized = 0;
        return false;
      }
      if (!hasQueueSize()) {
        memoizedIsInitialized = 0;
        return false;
      }
      if (!hasQueueHead()) {
        memoizedIsInitialized = 0;
        return false;
      }
      for (int i = 0; i < getActiveLogsCount(); i++) {
        if (!getActiveLogs(i).isInitialized()) {
          memoizedIsInitialized = 0;
          return false;
        }
      }
      memoizedIsInitialized = 1;
      return true;
    }

    public void writeTo(com.google.protobuf.CodedOutputStream output)
                        throws java.io.IOException {
      getSerializedSize();
      if (((bitField0_ & 0x00000001) == 0x00000001)) {
        output.writeSFixed32(1, version_);
      }
      if (((bitField0_ & 0x00000002) == 0x00000002)) {
        output.writeSFixed64(2, writeOrderID_);
      }
      if (((bitField0_ & 0x00000004) == 0x00000004)) {
        output.writeSFixed32(3, queueSize_);
      }
      if (((bitField0_ & 0x00000008) == 0x00000008)) {
        output.writeSFixed32(4, queueHead_);
      }
      for (int i = 0; i < activeLogs_.size(); i++) {
        output.writeMessage(5, activeLogs_.get(i));
      }
      getUnknownFields().writeTo(output);
    }

    private int memoizedSerializedSize = -1;
    public int getSerializedSize() {
      int size = memoizedSerializedSize;
      if (size != -1) return size;

      size = 0;
      if (((bitField0_ & 0x00000001) == 0x00000001)) {
        size += com.google.protobuf.CodedOutputStream
          .computeSFixed32Size(1, version_);
      }
      if (((bitField0_ & 0x00000002) == 0x00000002)) {
        size += com.google.protobuf.CodedOutputStream
          .computeSFixed64Size(2, writeOrderID_);
      }
      if (((bitField0_ & 0x00000004) == 0x00000004)) {
        size += com.google.protobuf.CodedOutputStream
          .computeSFixed32Size(3, queueSize_);
      }
      if (((bitField0_ & 0x00000008) == 0x00000008)) {
        size += com.google.protobuf.CodedOutputStream
          .computeSFixed32Size(4, queueHead_);
      }
      for (int i = 0; i < activeLogs_.size(); i++) {
        size += com.google.protobuf.CodedOutputStream
          .computeMessageSize(5, activeLogs_.get(i));
      }
      size += getUnknownFields().getSerializedSize();
      memoizedSerializedSize = size;
      return size;
    }

    private static final long serialVersionUID = 0L;
    @java.lang.Override
    protected java.lang.Object writeReplace()
        throws java.io.ObjectStreamException {
      return super.writeReplace();
    }

    public static org.apache.flume.channel.file.proto.ProtosFactory.Checkpoint parseFrom(
        com.google.protobuf.ByteString data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return newBuilder().mergeFrom(data).buildParsed();
    }
    public static org.apache.flume.channel.file.proto.ProtosFactory.Checkpoint parseFrom(
        com.google.protobuf.ByteString data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return newBuilder().mergeFrom(data, extensionRegistry)
               .buildParsed();
    }
    public static org.apache.flume.channel.file.proto.ProtosFactory.Checkpoint parseFrom(byte[] data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return newBuilder().mergeFrom(data).buildParsed();
    }
    public static org.apache.flume.channel.file.proto.ProtosFactory.Checkpoint parseFrom(
        byte[] data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return newBuilder().mergeFrom(data, extensionRegistry)
               .buildParsed();
    }
    public static org.apache.flume.channel.file.proto.ProtosFactory.Checkpoint parseFrom(java.io.InputStream input)
        throws java.io.IOException {
      return newBuilder().mergeFrom(input).buildParsed();
    }
    public static org.apache.flume.channel.file.proto.ProtosFactory.Checkpoint parseFrom(
        java.io.InputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return newBuilder().mergeFrom(input, extensionRegistry)
               .buildParsed();
    }
    public static org.apache.flume.channel.file.proto.ProtosFactory.Checkpoint parseDelimitedFrom(java.io.InputStream input)
        throws java.io.IOException {
      Builder builder = newBuilder();
      if (builder.mergeDelimitedFrom(input)) {
        return builder.buildParsed();
      } else {
        return null;
      }
    }
    public static org.apache.flume.channel.file.proto.ProtosFactory.Checkpoint parseDelimitedFrom(
        java.io.InputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      Builder builder = newBuilder();
      if (builder.mergeDelimitedFrom(input, extensionRegistry)) {
        return builder.buildParsed();
      } else {
        return null;
      }
    }
    public static org.apache.flume.channel.file.proto.ProtosFactory.Checkpoint parseFrom(
        com.google.protobuf.CodedInputStream input)
        throws java.io.IOException {
      return newBuilder().mergeFrom(input).buildParsed();
    }
    public static org.apache.flume.channel.file.proto.ProtosFactory.Checkpoint parseFrom(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return newBuilder().mergeFrom(input, extensionRegistry)
               .buildParsed();
    }

    public static Builder newBuilder() { return Builder.create(); }
    public Builder newBuilderForType() { return newBuilder(); }
    public static Builder newBuilder(org.apache.flume.channel.file.proto.ProtosFactory.Checkpoint prototype) {
      return newBuilder().mergeFrom(prototype);
    }
    public Builder toBuilder() { return newBuilder(this); }

    @java.lang.Override
    protected Builder newBuilderForType(
        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
      Builder builder = new Builder(parent);
      return builder;
    }
    public static final class Builder extends
        com.google.protobuf.GeneratedMessage.Builder<Builder>
       implements org.apache.flume.channel.file.proto.ProtosFactory.CheckpointOrBuilder {
      public static final com.google.protobuf.Descriptors.Descriptor
          getDescriptor() {
        return org.apache.flume.channel.file.proto.ProtosFactory.internal_static_Checkpoint_descriptor;
      }

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
          internalGetFieldAccessorTable() {
        return org.apache.flume.channel.file.proto.ProtosFactory.internal_static_Checkpoint_fieldAccessorTable;
      }

      // Construct using org.apache.flume.channel.file.proto.ProtosFactory.Checkpoint.newBuilder()
      private Builder() {
        maybeForceBuilderInitialization();
      }

      private Builder(BuilderParent parent) {
        super(parent);
        maybeForceBuilderInitialization();
      }
      private void maybeForceBuilderInitialization() {
        if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
          getActiveLogsFieldBuilder();
        }
      }
      private static Builder create() {
        return new Builder();
      }

      public Builder clear() {
        super.clear();
        version_ = 0;
        bitField0_ = (bitField0_ & ~0x00000001);
        writeOrderID_ = 0L;
        bitField0_ = (bitField0_ & ~0x00000002);
        queueSize_ = 0;
        bitField0_ = (bitField0_ & ~0x00000004);
        queueHead_ = 0;
        bitField0_ = (bitField0_ & ~0x00000008);
        if (activeLogsBuilder_ == null) {
          activeLogs_ = java.util.Collections.emptyList();
          bitField0_ = (bitField0_ & ~0x00000010);
        } else {
          activeLogsBuilder_.clear();
        }
        return this;
      }

      public Builder clone() {
        return create().mergeFrom(buildPartial());
      }

      public com.google.protobuf.Descriptors.Descriptor
          getDescriptorForType() {
        return org.apache.flume.channel.file.proto.ProtosFactory.Checkpoint.getDescriptor();
      }

      public org.apache.flume.channel.file.proto.ProtosFactory.Checkpoint getDefaultInstanceForType() {
        return org.apache.flume.channel.file.proto.ProtosFactory.Checkpoint.getDefaultInstance();
      }

      public org.apache.flume.channel.file.proto.ProtosFactory.Checkpoint build() {
        org.apache.flume.channel.file.proto.ProtosFactory.Checkpoint result = buildPartial();
        if (!result.isInitialized()) {
          throw newUninitializedMessageException(result);
        }
        return result;
      }

      private org.apache.flume.channel.file.proto.ProtosFactory.Checkpoint buildParsed()
          throws com.google.protobuf.InvalidProtocolBufferException {
        org.apache.flume.channel.file.proto.ProtosFactory.Checkpoint result = buildPartial();
        if (!result.isInitialized()) {
          throw newUninitializedMessageException(
            result).asInvalidProtocolBufferException();
        }
        return result;
      }

      public org.apache.flume.channel.file.proto.ProtosFactory.Checkpoint buildPartial() {
        org.apache.flume.channel.file.proto.ProtosFactory.Checkpoint result = new org.apache.flume.channel.file.proto.ProtosFactory.Checkpoint(this);
        int from_bitField0_ = bitField0_;
        int to_bitField0_ = 0;
        if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
          to_bitField0_ |= 0x00000001;
        }
        result.version_ = version_;
        if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
          to_bitField0_ |= 0x00000002;
        }
        result.writeOrderID_ = writeOrderID_;
        if (((from_bitField0_ & 0x00000004) == 0x00000004)) {
          to_bitField0_ |= 0x00000004;
        }
        result.queueSize_ = queueSize_;
        if (((from_bitField0_ & 0x00000008) == 0x00000008)) {
          to_bitField0_ |= 0x00000008;
        }
        result.queueHead_ = queueHead_;
        if (activeLogsBuilder_ == null) {
          if (((bitField0_ & 0x00000010) == 0x00000010)) {
            activeLogs_ = java.util.Collections.unmodifiableList(activeLogs_);
            bitField0_ = (bitField0_ & ~0x00000010);
          }
          result.activeLogs_ = activeLogs_;
        } else {
          result.activeLogs_ = activeLogsBuilder_.build();
        }
        result.bitField0_ = to_bitField0_;
        onBuilt();
        return result;
      }

      public Builder mergeFrom(com.google.protobuf.Message other) {
        if (other instanceof org.apache.flume.channel.file.proto.ProtosFactory.Checkpoint) {
          return mergeFrom((org.apache.flume.channel.file.proto.ProtosFactory.Checkpoint)other);
        } else {
          super.mergeFrom(other);
          return this;
        }
      }

      public Builder mergeFrom(org.apache.flume.channel.file.proto.ProtosFactory.Checkpoint other) {
        if (other == org.apache.flume.channel.file.proto.ProtosFactory.Checkpoint.getDefaultInstance()) return this;
        if (other.hasVersion()) {
          setVersion(other.getVersion());
        }
        if (other.hasWriteOrderID()) {
          setWriteOrderID(other.getWriteOrderID());
        }
        if (other.hasQueueSize()) {
          setQueueSize(other.getQueueSize());
        }
        if (other.hasQueueHead()) {
          setQueueHead(other.getQueueHead());
        }
        if (activeLogsBuilder_ == null) {
          if (!other.activeLogs_.isEmpty()) {
            if (activeLogs_.isEmpty()) {
              activeLogs_ = other.activeLogs_;
              bitField0_ = (bitField0_ & ~0x00000010);
            } else {
              ensureActiveLogsIsMutable();
              activeLogs_.addAll(other.activeLogs_);
            }
            onChanged();
          }
        } else {
          if (!other.activeLogs_.isEmpty()) {
            if (activeLogsBuilder_.isEmpty()) {
              activeLogsBuilder_.dispose();
              activeLogsBuilder_ = null;
              activeLogs_ = other.activeLogs_;
              bitField0_ = (bitField0_ & ~0x00000010);
              activeLogsBuilder_ =
                com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
                   getActiveLogsFieldBuilder() : null;
            } else {
              activeLogsBuilder_.addAllMessages(other.activeLogs_);
            }
          }
        }
        this.mergeUnknownFields(other.getUnknownFields());
        return this;
      }

      public final boolean isInitialized() {
        if (!hasVersion()) {

          return false;
        }
        if (!hasWriteOrderID()) {

          return false;
        }
        if (!hasQueueSize()) {

          return false;
        }
        if (!hasQueueHead()) {

          return false;
        }
        for (int i = 0; i < getActiveLogsCount(); i++) {
          if (!getActiveLogs(i).isInitialized()) {

            return false;
          }
        }
        return true;
      }

      public Builder mergeFrom(
          com.google.protobuf.CodedInputStream input,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws java.io.IOException {
        com.google.protobuf.UnknownFieldSet.Builder unknownFields =
          com.google.protobuf.UnknownFieldSet.newBuilder(
            this.getUnknownFields());
        while (true) {
          int tag = input.readTag();
          switch (tag) {
            case 0:
              this.setUnknownFields(unknownFields.build());
              onChanged();
              return this;
            default: {
              if (!parseUnknownField(input, unknownFields,
                                     extensionRegistry, tag)) {
                this.setUnknownFields(unknownFields.build());
                onChanged();
                return this;
              }
              break;
            }
            case 13: {
              bitField0_ |= 0x00000001;
              version_ = input.readSFixed32();
              break;
            }
            case 17: {
              bitField0_ |= 0x00000002;
              writeOrderID_ = input.readSFixed64();
              break;
            }
            case 29: {
              bitField0_ |= 0x00000004;
              queueSize_ = input.readSFixed32();
              break;
            }
            case 37: {
              bitField0_ |= 0x00000008;
              queueHead_ = input.readSFixed32();
              break;
            }
            case 42: {
              org.apache.flume.channel.file.proto.ProtosFactory.ActiveLog.Builder subBuilder = org.apache.flume.channel.file.proto.ProtosFactory.ActiveLog.newBuilder();
              input.readMessage(subBuilder, extensionRegistry);
              addActiveLogs(subBuilder.buildPartial());
              break;
            }
          }
        }
      }

      private int bitField0_;

      // required sfixed32 version = 1;
      private int version_ ;
      public boolean hasVersion() {
        return ((bitField0_ & 0x00000001) == 0x00000001);
      }
      public int getVersion() {
        return version_;
      }
      public Builder setVersion(int value) {
        bitField0_ |= 0x00000001;
        version_ = value;
        onChanged();
        return this;
      }
      public Builder clearVersion() {
        bitField0_ = (bitField0_ & ~0x00000001);
        version_ = 0;
        onChanged();
        return this;
      }

      // required sfixed64 writeOrderID = 2;
      private long writeOrderID_ ;
      public boolean hasWriteOrderID() {
        return ((bitField0_ & 0x00000002) == 0x00000002);
      }
      public long getWriteOrderID() {
        return writeOrderID_;
      }
      public Builder setWriteOrderID(long value) {
        bitField0_ |= 0x00000002;
        writeOrderID_ = value;
        onChanged();
        return this;
      }
      public Builder clearWriteOrderID() {
        bitField0_ = (bitField0_ & ~0x00000002);
        writeOrderID_ = 0L;
        onChanged();
        return this;
      }

      // required sfixed32 queueSize = 3;
      private int queueSize_ ;
      public boolean hasQueueSize() {
        return ((bitField0_ & 0x00000004) == 0x00000004);
      }
      public int getQueueSize() {
        return queueSize_;
      }
      public Builder setQueueSize(int value) {
        bitField0_ |= 0x00000004;
        queueSize_ = value;
        onChanged();
        return this;
      }
      public Builder clearQueueSize() {
        bitField0_ = (bitField0_ & ~0x00000004);
        queueSize_ = 0;
        onChanged();
        return this;
      }

      // required sfixed32 queueHead = 4;
      private int queueHead_ ;
      public boolean hasQueueHead() {
        return ((bitField0_ & 0x00000008) == 0x00000008);
      }
      public int getQueueHead() {
        return queueHead_;
      }
      public Builder setQueueHead(int value) {
        bitField0_ |= 0x00000008;
        queueHead_ = value;
        onChanged();
        return this;
      }
      public Builder clearQueueHead() {
        bitField0_ = (bitField0_ & ~0x00000008);
        queueHead_ = 0;
        onChanged();
        return this;
      }

      // repeated .ActiveLog activeLogs = 5;
      private java.util.List<org.apache.flume.channel.file.proto.ProtosFactory.ActiveLog> activeLogs_ =
        java.util.Collections.emptyList();
      private void ensureActiveLogsIsMutable() {
        if (!((bitField0_ & 0x00000010) == 0x00000010)) {
          activeLogs_ = new java.util.ArrayList<org.apache.flume.channel.file.proto.ProtosFactory.ActiveLog>(activeLogs_);
          bitField0_ |= 0x00000010;
         }
      }

      private com.google.protobuf.RepeatedFieldBuilder<
          org.apache.flume.channel.file.proto.ProtosFactory.ActiveLog, org.apache.flume.channel.file.proto.ProtosFactory.ActiveLog.Builder, org.apache.flume.channel.file.proto.ProtosFactory.ActiveLogOrBuilder> activeLogsBuilder_;

      public java.util.List<org.apache.flume.channel.file.proto.ProtosFactory.ActiveLog> getActiveLogsList() {
        if (activeLogsBuilder_ == null) {
          return java.util.Collections.unmodifiableList(activeLogs_);
        } else {
          return activeLogsBuilder_.getMessageList();
        }
      }
      public int getActiveLogsCount() {
        if (activeLogsBuilder_ == null) {
          return activeLogs_.size();
        } else {
          return activeLogsBuilder_.getCount();
        }
      }
      public org.apache.flume.channel.file.proto.ProtosFactory.ActiveLog getActiveLogs(int index) {
        if (activeLogsBuilder_ == null) {
          return activeLogs_.get(index);
        } else {
          return activeLogsBuilder_.getMessage(index);
        }
      }
      public Builder setActiveLogs(
          int index, org.apache.flume.channel.file.proto.ProtosFactory.ActiveLog value) {
        if (activeLogsBuilder_ == null) {
          if (value == null) {
            throw new NullPointerException();
          }
          ensureActiveLogsIsMutable();
          activeLogs_.set(index, value);
          onChanged();
        } else {
          activeLogsBuilder_.setMessage(index, value);
        }
        return this;
      }
      public Builder setActiveLogs(
          int index, org.apache.flume.channel.file.proto.ProtosFactory.ActiveLog.Builder builderForValue) {
        if (activeLogsBuilder_ == null) {
          ensureActiveLogsIsMutable();
          activeLogs_.set(index, builderForValue.build());
          onChanged();
        } else {
          activeLogsBuilder_.setMessage(index, builderForValue.build());
        }
        return this;
      }
      public Builder addActiveLogs(org.apache.flume.channel.file.proto.ProtosFactory.ActiveLog value) {
        if (activeLogsBuilder_ == null) {
          if (value == null) {
            throw new NullPointerException();
          }
          ensureActiveLogsIsMutable();
          activeLogs_.add(value);
          onChanged();
        } else {
          activeLogsBuilder_.addMessage(value);
        }
        return this;
      }
      public Builder addActiveLogs(
          int index, org.apache.flume.channel.file.proto.ProtosFactory.ActiveLog value) {
        if (activeLogsBuilder_ == null) {
          if (value == null) {
            throw new NullPointerException();
          }
          ensureActiveLogsIsMutable();
          activeLogs_.add(index, value);
          onChanged();
        } else {
          activeLogsBuilder_.addMessage(index, value);
        }
        return this;
      }
      public Builder addActiveLogs(
          org.apache.flume.channel.file.proto.ProtosFactory.ActiveLog.Builder builderForValue) {
        if (activeLogsBuilder_ == null) {
          ensureActiveLogsIsMutable();
          activeLogs_.add(builderForValue.build());
          onChanged();
        } else {
          activeLogsBuilder_.addMessage(builderForValue.build());
        }
        return this;
      }
      public Builder addActiveLogs(
          int index, org.apache.flume.channel.file.proto.ProtosFactory.ActiveLog.Builder builderForValue) {
        if (activeLogsBuilder_ == null) {
          ensureActiveLogsIsMutable();
          activeLogs_.add(index, builderForValue.build());
          onChanged();
        } else {
          activeLogsBuilder_.addMessage(index, builderForValue.build());
        }
        return this;
      }
      public Builder addAllActiveLogs(
          java.lang.Iterable<? extends org.apache.flume.channel.file.proto.ProtosFactory.ActiveLog> values) {
        if (activeLogsBuilder_ == null) {
          ensureActiveLogsIsMutable();
          super.addAll(values, activeLogs_);
          onChanged();
        } else {
          activeLogsBuilder_.addAllMessages(values);
        }
        return this;
      }
      public Builder clearActiveLogs() {
        if (activeLogsBuilder_ == null) {
          activeLogs_ = java.util.Collections.emptyList();
          bitField0_ = (bitField0_ & ~0x00000010);
          onChanged();
        } else {
          activeLogsBuilder_.clear();
        }
        return this;
      }
      public Builder removeActiveLogs(int index) {
        if (activeLogsBuilder_ == null) {
          ensureActiveLogsIsMutable();
          activeLogs_.remove(index);
          onChanged();
        } else {
          activeLogsBuilder_.remove(index);
        }
        return this;
      }
      public org.apache.flume.channel.file.proto.ProtosFactory.ActiveLog.Builder getActiveLogsBuilder(
          int index) {
        return getActiveLogsFieldBuilder().getBuilder(index);
      }
      public org.apache.flume.channel.file.proto.ProtosFactory.ActiveLogOrBuilder getActiveLogsOrBuilder(
          int index) {
        if (activeLogsBuilder_ == null) {
          return activeLogs_.get(index);  } else {
          return activeLogsBuilder_.getMessageOrBuilder(index);
        }
      }
      public java.util.List<? extends org.apache.flume.channel.file.proto.ProtosFactory.ActiveLogOrBuilder>
           getActiveLogsOrBuilderList() {
        if (activeLogsBuilder_ != null) {
          return activeLogsBuilder_.getMessageOrBuilderList();
        } else {
          return java.util.Collections.unmodifiableList(activeLogs_);
        }
      }
      public org.apache.flume.channel.file.proto.ProtosFactory.ActiveLog.Builder addActiveLogsBuilder() {
        return getActiveLogsFieldBuilder().addBuilder(
            org.apache.flume.channel.file.proto.ProtosFactory.ActiveLog.getDefaultInstance());
      }
      public org.apache.flume.channel.file.proto.ProtosFactory.ActiveLog.Builder addActiveLogsBuilder(
          int index) {
        return getActiveLogsFieldBuilder().addBuilder(
            index, org.apache.flume.channel.file.proto.ProtosFactory.ActiveLog.getDefaultInstance());
      }
      public java.util.List<org.apache.flume.channel.file.proto.ProtosFactory.ActiveLog.Builder>
           getActiveLogsBuilderList() {
        return getActiveLogsFieldBuilder().getBuilderList();
      }
      private com.google.protobuf.RepeatedFieldBuilder<
          org.apache.flume.channel.file.proto.ProtosFactory.ActiveLog, org.apache.flume.channel.file.proto.ProtosFactory.ActiveLog.Builder, org.apache.flume.channel.file.proto.ProtosFactory.ActiveLogOrBuilder>
          getActiveLogsFieldBuilder() {
        if (activeLogsBuilder_ == null) {
          activeLogsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
              org.apache.flume.channel.file.proto.ProtosFactory.ActiveLog, org.apache.flume.channel.file.proto.ProtosFactory.ActiveLog.Builder, org.apache.flume.channel.file.proto.ProtosFactory.ActiveLogOrBuilder>(
                  activeLogs_,
                  ((bitField0_ & 0x00000010) == 0x00000010),
                  getParentForChildren(),
                  isClean());
          activeLogs_ = null;
        }
        return activeLogsBuilder_;
      }

      // @@protoc_insertion_point(builder_scope:Checkpoint)
    }

    static {
      defaultInstance = new Checkpoint(true);
      defaultInstance.initFields();
    }

    // @@protoc_insertion_point(class_scope:Checkpoint)
  }

  public interface ActiveLogOrBuilder
      extends com.google.protobuf.MessageOrBuilder {

    // required sfixed32 logFileID = 1;
    boolean hasLogFileID();
    int getLogFileID();

    // required sfixed32 count = 2;
    boolean hasCount();
    int getCount();
  }
  public static final class ActiveLog extends
      com.google.protobuf.GeneratedMessage
      implements ActiveLogOrBuilder {
    // Use ActiveLog.newBuilder() to construct.
    private ActiveLog(Builder builder) {
      super(builder);
    }
    private ActiveLog(boolean noInit) {}

    private static final ActiveLog defaultInstance;
    public static ActiveLog getDefaultInstance() {
      return defaultInstance;
    }

    public ActiveLog getDefaultInstanceForType() {
      return defaultInstance;
    }

    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return org.apache.flume.channel.file.proto.ProtosFactory.internal_static_ActiveLog_descriptor;
    }

    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return org.apache.flume.channel.file.proto.ProtosFactory.internal_static_ActiveLog_fieldAccessorTable;
    }

    private int bitField0_;
    // required sfixed32 logFileID = 1;
    public static final int LOGFILEID_FIELD_NUMBER = 1;
    private int logFileID_;
    public boolean hasLogFileID() {
      return ((bitField0_ & 0x00000001) == 0x00000001);
    }
    public int getLogFileID() {
      return logFileID_;
    }

    // required sfixed32 count = 2;
    public static final int COUNT_FIELD_NUMBER = 2;
    private int count_;
    public boolean hasCount() {
      return ((bitField0_ & 0x00000002) == 0x00000002);
    }
    public int getCount() {
      return count_;
    }

    private void initFields() {
      logFileID_ = 0;
      count_ = 0;
    }
    private byte memoizedIsInitialized = -1;
    public final boolean isInitialized() {
      byte isInitialized = memoizedIsInitialized;
      if (isInitialized != -1) return isInitialized == 1;

      if (!hasLogFileID()) {
        memoizedIsInitialized = 0;
        return false;
      }
      if (!hasCount()) {
        memoizedIsInitialized = 0;
        return false;
      }
      memoizedIsInitialized = 1;
      return true;
    }

    public void writeTo(com.google.protobuf.CodedOutputStream output)
                        throws java.io.IOException {
      getSerializedSize();
      if (((bitField0_ & 0x00000001) == 0x00000001)) {
        output.writeSFixed32(1, logFileID_);
      }
      if (((bitField0_ & 0x00000002) == 0x00000002)) {
        output.writeSFixed32(2, count_);
      }
      getUnknownFields().writeTo(output);
    }

    private int memoizedSerializedSize = -1;
    public int getSerializedSize() {
      int size = memoizedSerializedSize;
      if (size != -1) return size;

      size = 0;
      if (((bitField0_ & 0x00000001) == 0x00000001)) {
        size += com.google.protobuf.CodedOutputStream
          .computeSFixed32Size(1, logFileID_);
      }
      if (((bitField0_ & 0x00000002) == 0x00000002)) {
        size += com.google.protobuf.CodedOutputStream
          .computeSFixed32Size(2, count_);
      }
      size += getUnknownFields().getSerializedSize();
      memoizedSerializedSize = size;
      return size;
    }

    private static final long serialVersionUID = 0L;
    @java.lang.Override
    protected java.lang.Object writeReplace()
        throws java.io.ObjectStreamException {
      return super.writeReplace();
    }

    public static org.apache.flume.channel.file.proto.ProtosFactory.ActiveLog parseFrom(
        com.google.protobuf.ByteString data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return newBuilder().mergeFrom(data).buildParsed();
    }
    public static org.apache.flume.channel.file.proto.ProtosFactory.ActiveLog parseFrom(
        com.google.protobuf.ByteString data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return newBuilder().mergeFrom(data, extensionRegistry)
               .buildParsed();
    }
    public static org.apache.flume.channel.file.proto.ProtosFactory.ActiveLog parseFrom(byte[] data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return newBuilder().mergeFrom(data).buildParsed();
    }
    public static org.apache.flume.channel.file.proto.ProtosFactory.ActiveLog parseFrom(
        byte[] data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return newBuilder().mergeFrom(data, extensionRegistry)
               .buildParsed();
    }
    public static org.apache.flume.channel.file.proto.ProtosFactory.ActiveLog parseFrom(java.io.InputStream input)
        throws java.io.IOException {
      return newBuilder().mergeFrom(input).buildParsed();
    }
    public static org.apache.flume.channel.file.proto.ProtosFactory.ActiveLog parseFrom(
        java.io.InputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return newBuilder().mergeFrom(input, extensionRegistry)
               .buildParsed();
    }
    public static org.apache.flume.channel.file.proto.ProtosFactory.ActiveLog parseDelimitedFrom(java.io.InputStream input)
        throws java.io.IOException {
      Builder builder = newBuilder();
      if (builder.mergeDelimitedFrom(input)) {
        return builder.buildParsed();
      } else {
        return null;
      }
    }
    public static org.apache.flume.channel.file.proto.ProtosFactory.ActiveLog parseDelimitedFrom(
        java.io.InputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      Builder builder = newBuilder();
      if (builder.mergeDelimitedFrom(input, extensionRegistry)) {
        return builder.buildParsed();
      } else {
        return null;
      }
    }
    public static org.apache.flume.channel.file.proto.ProtosFactory.ActiveLog parseFrom(
        com.google.protobuf.CodedInputStream input)
        throws java.io.IOException {
      return newBuilder().mergeFrom(input).buildParsed();
    }
    public static org.apache.flume.channel.file.proto.ProtosFactory.ActiveLog parseFrom(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return newBuilder().mergeFrom(input, extensionRegistry)
               .buildParsed();
    }

    public static Builder newBuilder() { return Builder.create(); }
    public Builder newBuilderForType() { return newBuilder(); }
    public static Builder newBuilder(org.apache.flume.channel.file.proto.ProtosFactory.ActiveLog prototype) {
      return newBuilder().mergeFrom(prototype);
    }
    public Builder toBuilder() { return newBuilder(this); }

    @java.lang.Override
    protected Builder newBuilderForType(
        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
      Builder builder = new Builder(parent);
      return builder;
    }
    public static final class Builder extends
        com.google.protobuf.GeneratedMessage.Builder<Builder>
       implements org.apache.flume.channel.file.proto.ProtosFactory.ActiveLogOrBuilder {
      public static final com.google.protobuf.Descriptors.Descriptor
          getDescriptor() {
        return org.apache.flume.channel.file.proto.ProtosFactory.internal_static_ActiveLog_descriptor;
      }

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
          internalGetFieldAccessorTable() {
        return org.apache.flume.channel.file.proto.ProtosFactory.internal_static_ActiveLog_fieldAccessorTable;
      }

      // Construct using org.apache.flume.channel.file.proto.ProtosFactory.ActiveLog.newBuilder()
      private Builder() {
        maybeForceBuilderInitialization();
      }

      private Builder(BuilderParent parent) {
        super(parent);
        maybeForceBuilderInitialization();
      }
      private void maybeForceBuilderInitialization() {
        if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
        }
      }
      private static Builder create() {
        return new Builder();
      }

      public Builder clear() {
        super.clear();
        logFileID_ = 0;
        bitField0_ = (bitField0_ & ~0x00000001);
        count_ = 0;
        bitField0_ = (bitField0_ & ~0x00000002);
        return this;
      }

      public Builder clone() {
        return create().mergeFrom(buildPartial());
      }

      public com.google.protobuf.Descriptors.Descriptor
          getDescriptorForType() {
        return org.apache.flume.channel.file.proto.ProtosFactory.ActiveLog.getDescriptor();
      }

      public org.apache.flume.channel.file.proto.ProtosFactory.ActiveLog getDefaultInstanceForType() {
        return org.apache.flume.channel.file.proto.ProtosFactory.ActiveLog.getDefaultInstance();
      }

      public org.apache.flume.channel.file.proto.ProtosFactory.ActiveLog build() {
        org.apache.flume.channel.file.proto.ProtosFactory.ActiveLog result = buildPartial();
        if (!result.isInitialized()) {
          throw newUninitializedMessageException(result);
        }
        return result;
      }

      private org.apache.flume.channel.file.proto.ProtosFactory.ActiveLog buildParsed()
          throws com.google.protobuf.InvalidProtocolBufferException {
        org.apache.flume.channel.file.proto.ProtosFactory.ActiveLog result = buildPartial();
        if (!result.isInitialized()) {
          throw newUninitializedMessageException(
            result).asInvalidProtocolBufferException();
        }
        return result;
      }

      public org.apache.flume.channel.file.proto.ProtosFactory.ActiveLog buildPartial() {
        org.apache.flume.channel.file.proto.ProtosFactory.ActiveLog result = new org.apache.flume.channel.file.proto.ProtosFactory.ActiveLog(this);
        int from_bitField0_ = bitField0_;
        int to_bitField0_ = 0;
        if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
          to_bitField0_ |= 0x00000001;
        }
        result.logFileID_ = logFileID_;
        if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
          to_bitField0_ |= 0x00000002;
        }
        result.count_ = count_;
        result.bitField0_ = to_bitField0_;
        onBuilt();
        return result;
      }

      public Builder mergeFrom(com.google.protobuf.Message other) {
        if (other instanceof org.apache.flume.channel.file.proto.ProtosFactory.ActiveLog) {
          return mergeFrom((org.apache.flume.channel.file.proto.ProtosFactory.ActiveLog)other);
        } else {
          super.mergeFrom(other);
          return this;
        }
      }

      public Builder mergeFrom(org.apache.flume.channel.file.proto.ProtosFactory.ActiveLog other) {
        if (other == org.apache.flume.channel.file.proto.ProtosFactory.ActiveLog.getDefaultInstance()) return this;
        if (other.hasLogFileID()) {
          setLogFileID(other.getLogFileID());
        }
        if (other.hasCount()) {
          setCount(other.getCount());
        }
        this.mergeUnknownFields(other.getUnknownFields());
        return this;
      }

      public final boolean isInitialized() {
        if (!hasLogFileID()) {

          return false;
        }
        if (!hasCount()) {

          return false;
        }
        return true;
      }

      public Builder mergeFrom(
          com.google.protobuf.CodedInputStream input,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws java.io.IOException {
        com.google.protobuf.UnknownFieldSet.Builder unknownFields =
          com.google.protobuf.UnknownFieldSet.newBuilder(
            this.getUnknownFields());
        while (true) {
          int tag = input.readTag();
          switch (tag) {
            case 0:
              this.setUnknownFields(unknownFields.build());
              onChanged();
              return this;
            default: {
              if (!parseUnknownField(input, unknownFields,
                                     extensionRegistry, tag)) {
                this.setUnknownFields(unknownFields.build());
                onChanged();
                return this;
              }
              break;
            }
            case 13: {
              bitField0_ |= 0x00000001;
              logFileID_ = input.readSFixed32();
              break;
            }
            case 21: {
              bitField0_ |= 0x00000002;
              count_ = input.readSFixed32();
              break;
            }
          }
        }
      }

      private int bitField0_;

      // required sfixed32 logFileID = 1;
      private int logFileID_ ;
      public boolean hasLogFileID() {
        return ((bitField0_ & 0x00000001) == 0x00000001);
      }
      public int getLogFileID() {
        return logFileID_;
      }
      public Builder setLogFileID(int value) {
        bitField0_ |= 0x00000001;
        logFileID_ = value;
        onChanged();
        return this;
      }
      public Builder clearLogFileID() {
        bitField0_ = (bitField0_ & ~0x00000001);
        logFileID_ = 0;
        onChanged();
        return this;
      }

      // required sfixed32 count = 2;
      private int count_ ;
      public boolean hasCount() {
        return ((bitField0_ & 0x00000002) == 0x00000002);
      }
      public int getCount() {
        return count_;
      }
      public Builder setCount(int value) {
        bitField0_ |= 0x00000002;
        count_ = value;
        onChanged();
        return this;
      }
      public Builder clearCount() {
        bitField0_ = (bitField0_ & ~0x00000002);
        count_ = 0;
        onChanged();
        return this;
      }

      // @@protoc_insertion_point(builder_scope:ActiveLog)
    }

    static {
      defaultInstance = new ActiveLog(true);
      defaultInstance.initFields();
    }

    // @@protoc_insertion_point(class_scope:ActiveLog)
  }

  public interface LogFileMetaDataOrBuilder
      extends com.google.protobuf.MessageOrBuilder {

    // required sfixed32 version = 1;
    boolean hasVersion();
    int getVersion();

    // required sfixed32 logFileID = 2;
    boolean hasLogFileID();
    int getLogFileID();

    // required sfixed64 checkpointPosition = 3;
    boolean hasCheckpointPosition();
    long getCheckpointPosition();

    // required sfixed64 checkpointWriteOrderID = 4;
    boolean hasCheckpointWriteOrderID();
    long getCheckpointWriteOrderID();

    // optional .LogFileEncryption encryption = 5;
    boolean hasEncryption();
    org.apache.flume.channel.file.proto.ProtosFactory.LogFileEncryption getEncryption();
    org.apache.flume.channel.file.proto.ProtosFactory.LogFileEncryptionOrBuilder getEncryptionOrBuilder();
  }
  public static final class LogFileMetaData extends
      com.google.protobuf.GeneratedMessage
      implements LogFileMetaDataOrBuilder {
    // Use LogFileMetaData.newBuilder() to construct.
    private LogFileMetaData(Builder builder) {
      super(builder);
    }
    private LogFileMetaData(boolean noInit) {}

    private static final LogFileMetaData defaultInstance;
    public static LogFileMetaData getDefaultInstance() {
      return defaultInstance;
    }

    public LogFileMetaData getDefaultInstanceForType() {
      return defaultInstance;
    }

    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return org.apache.flume.channel.file.proto.ProtosFactory.internal_static_LogFileMetaData_descriptor;
    }

    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return org.apache.flume.channel.file.proto.ProtosFactory.internal_static_LogFileMetaData_fieldAccessorTable;
    }

    private int bitField0_;
    // required sfixed32 version = 1;
    public static final int VERSION_FIELD_NUMBER = 1;
    private int version_;
    public boolean hasVersion() {
      return ((bitField0_ & 0x00000001) == 0x00000001);
    }
    public int getVersion() {
      return version_;
    }

    // required sfixed32 logFileID = 2;
    public static final int LOGFILEID_FIELD_NUMBER = 2;
    private int logFileID_;
    public boolean hasLogFileID() {
      return ((bitField0_ & 0x00000002) == 0x00000002);
    }
    public int getLogFileID() {
      return logFileID_;
    }

    // required sfixed64 checkpointPosition = 3;
    public static final int CHECKPOINTPOSITION_FIELD_NUMBER = 3;
    private long checkpointPosition_;
    public boolean hasCheckpointPosition() {
      return ((bitField0_ & 0x00000004) == 0x00000004);
    }
    public long getCheckpointPosition() {
      return checkpointPosition_;
    }

    // required sfixed64 checkpointWriteOrderID = 4;
    public static final int CHECKPOINTWRITEORDERID_FIELD_NUMBER = 4;
    private long checkpointWriteOrderID_;
    public boolean hasCheckpointWriteOrderID() {
      return ((bitField0_ & 0x00000008) == 0x00000008);
    }
    public long getCheckpointWriteOrderID() {
      return checkpointWriteOrderID_;
    }

    // optional .LogFileEncryption encryption = 5;
    public static final int ENCRYPTION_FIELD_NUMBER = 5;
    private org.apache.flume.channel.file.proto.ProtosFactory.LogFileEncryption encryption_;
    public boolean hasEncryption() {
      return ((bitField0_ & 0x00000010) == 0x00000010);
    }
    public org.apache.flume.channel.file.proto.ProtosFactory.LogFileEncryption getEncryption() {
      return encryption_;
    }
    public org.apache.flume.channel.file.proto.ProtosFactory.LogFileEncryptionOrBuilder getEncryptionOrBuilder() {
      return encryption_;
    }

    private void initFields() {
      version_ = 0;
      logFileID_ = 0;
      checkpointPosition_ = 0L;
      checkpointWriteOrderID_ = 0L;
      encryption_ = org.apache.flume.channel.file.proto.ProtosFactory.LogFileEncryption.getDefaultInstance();
    }
    private byte memoizedIsInitialized = -1;
    public final boolean isInitialized() {
      byte isInitialized = memoizedIsInitialized;
      if (isInitialized != -1) return isInitialized == 1;

      if (!hasVersion()) {
        memoizedIsInitialized = 0;
        return false;
      }
      if (!hasLogFileID()) {
        memoizedIsInitialized = 0;
        return false;
      }
      if (!hasCheckpointPosition()) {
        memoizedIsInitialized = 0;
        return false;
      }
      if (!hasCheckpointWriteOrderID()) {
        memoizedIsInitialized = 0;
        return false;
      }
      if (hasEncryption()) {
        if (!getEncryption().isInitialized()) {
          memoizedIsInitialized = 0;
          return false;
        }
      }
      memoizedIsInitialized = 1;
      return true;
    }

    public void writeTo(com.google.protobuf.CodedOutputStream output)
                        throws java.io.IOException {
      getSerializedSize();
      if (((bitField0_ & 0x00000001) == 0x00000001)) {
        output.writeSFixed32(1, version_);
      }
      if (((bitField0_ & 0x00000002) == 0x00000002)) {
        output.writeSFixed32(2, logFileID_);
      }
      if (((bitField0_ & 0x00000004) == 0x00000004)) {
        output.writeSFixed64(3, checkpointPosition_);
      }
      if (((bitField0_ & 0x00000008) == 0x00000008)) {
        output.writeSFixed64(4, checkpointWriteOrderID_);
      }
      if (((bitField0_ & 0x00000010) == 0x00000010)) {
        output.writeMessage(5, encryption_);
      }
      getUnknownFields().writeTo(output);
    }

    private int memoizedSerializedSize = -1;
    public int getSerializedSize() {
      int size = memoizedSerializedSize;
      if (size != -1) return size;

      size = 0;
      if (((bitField0_ & 0x00000001) == 0x00000001)) {
        size += com.google.protobuf.CodedOutputStream
          .computeSFixed32Size(1, version_);
      }
      if (((bitField0_ & 0x00000002) == 0x00000002)) {
        size += com.google.protobuf.CodedOutputStream
          .computeSFixed32Size(2, logFileID_);
      }
      if (((bitField0_ & 0x00000004) == 0x00000004)) {
        size += com.google.protobuf.CodedOutputStream
          .computeSFixed64Size(3, checkpointPosition_);
      }
      if (((bitField0_ & 0x00000008) == 0x00000008)) {
        size += com.google.protobuf.CodedOutputStream
          .computeSFixed64Size(4, checkpointWriteOrderID_);
      }
      if (((bitField0_ & 0x00000010) == 0x00000010)) {
        size += com.google.protobuf.CodedOutputStream
          .computeMessageSize(5, encryption_);
      }
      size += getUnknownFields().getSerializedSize();
      memoizedSerializedSize = size;
      return size;
    }

    private static final long serialVersionUID = 0L;
    @java.lang.Override
    protected java.lang.Object writeReplace()
        throws java.io.ObjectStreamException {
      return super.writeReplace();
    }

    public static org.apache.flume.channel.file.proto.ProtosFactory.LogFileMetaData parseFrom(
        com.google.protobuf.ByteString data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return newBuilder().mergeFrom(data).buildParsed();
    }
    public static org.apache.flume.channel.file.proto.ProtosFactory.LogFileMetaData parseFrom(
        com.google.protobuf.ByteString data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return newBuilder().mergeFrom(data, extensionRegistry)
               .buildParsed();
    }
    public static org.apache.flume.channel.file.proto.ProtosFactory.LogFileMetaData parseFrom(byte[] data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return newBuilder().mergeFrom(data).buildParsed();
    }
    public static org.apache.flume.channel.file.proto.ProtosFactory.LogFileMetaData parseFrom(
        byte[] data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return newBuilder().mergeFrom(data, extensionRegistry)
               .buildParsed();
    }
    public static org.apache.flume.channel.file.proto.ProtosFactory.LogFileMetaData parseFrom(java.io.InputStream input)
        throws java.io.IOException {
      return newBuilder().mergeFrom(input).buildParsed();
    }
    public static org.apache.flume.channel.file.proto.ProtosFactory.LogFileMetaData parseFrom(
        java.io.InputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return newBuilder().mergeFrom(input, extensionRegistry)
               .buildParsed();
    }
    public static org.apache.flume.channel.file.proto.ProtosFactory.LogFileMetaData parseDelimitedFrom(java.io.InputStream input)
        throws java.io.IOException {
      Builder builder = newBuilder();
      if (builder.mergeDelimitedFrom(input)) {
        return builder.buildParsed();
      } else {
        return null;
      }
    }
    public static org.apache.flume.channel.file.proto.ProtosFactory.LogFileMetaData parseDelimitedFrom(
        java.io.InputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      Builder builder = newBuilder();
      if (builder.mergeDelimitedFrom(input, extensionRegistry)) {
        return builder.buildParsed();
      } else {
        return null;
      }
    }
    public static org.apache.flume.channel.file.proto.ProtosFactory.LogFileMetaData parseFrom(
        com.google.protobuf.CodedInputStream input)
        throws java.io.IOException {
      return newBuilder().mergeFrom(input).buildParsed();
    }
    public static org.apache.flume.channel.file.proto.ProtosFactory.LogFileMetaData parseFrom(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return newBuilder().mergeFrom(input, extensionRegistry)
               .buildParsed();
    }

    public static Builder newBuilder() { return Builder.create(); }
    public Builder newBuilderForType() { return newBuilder(); }
    public static Builder newBuilder(org.apache.flume.channel.file.proto.ProtosFactory.LogFileMetaData prototype) {
      return newBuilder().mergeFrom(prototype);
    }
    public Builder toBuilder() { return newBuilder(this); }

    @java.lang.Override
    protected Builder newBuilderForType(
        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
      Builder builder = new Builder(parent);
      return builder;
    }
    public static final class Builder extends
        com.google.protobuf.GeneratedMessage.Builder<Builder>
       implements org.apache.flume.channel.file.proto.ProtosFactory.LogFileMetaDataOrBuilder {
      public static final com.google.protobuf.Descriptors.Descriptor
          getDescriptor() {
        return org.apache.flume.channel.file.proto.ProtosFactory.internal_static_LogFileMetaData_descriptor;
      }

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
          internalGetFieldAccessorTable() {
        return org.apache.flume.channel.file.proto.ProtosFactory.internal_static_LogFileMetaData_fieldAccessorTable;
      }

      // Construct using org.apache.flume.channel.file.proto.ProtosFactory.LogFileMetaData.newBuilder()
      private Builder() {
        maybeForceBuilderInitialization();
      }

      private Builder(BuilderParent parent) {
        super(parent);
        maybeForceBuilderInitialization();
      }
      private void maybeForceBuilderInitialization() {
        if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
          getEncryptionFieldBuilder();
        }
      }
      private static Builder create() {
        return new Builder();
      }

      public Builder clear() {
        super.clear();
        version_ = 0;
        bitField0_ = (bitField0_ & ~0x00000001);
        logFileID_ = 0;
        bitField0_ = (bitField0_ & ~0x00000002);
        checkpointPosition_ = 0L;
        bitField0_ = (bitField0_ & ~0x00000004);
        checkpointWriteOrderID_ = 0L;
        bitField0_ = (bitField0_ & ~0x00000008);
        if (encryptionBuilder_ == null) {
          encryption_ = org.apache.flume.channel.file.proto.ProtosFactory.LogFileEncryption.getDefaultInstance();
        } else {
          encryptionBuilder_.clear();
        }
        bitField0_ = (bitField0_ & ~0x00000010);
        return this;
      }

      public Builder clone() {
        return create().mergeFrom(buildPartial());
      }

      public com.google.protobuf.Descriptors.Descriptor
          getDescriptorForType() {
        return org.apache.flume.channel.file.proto.ProtosFactory.LogFileMetaData.getDescriptor();
      }

      public org.apache.flume.channel.file.proto.ProtosFactory.LogFileMetaData getDefaultInstanceForType() {
        return org.apache.flume.channel.file.proto.ProtosFactory.LogFileMetaData.getDefaultInstance();
      }

      public org.apache.flume.channel.file.proto.ProtosFactory.LogFileMetaData build() {
        org.apache.flume.channel.file.proto.ProtosFactory.LogFileMetaData result = buildPartial();
        if (!result.isInitialized()) {
          throw newUninitializedMessageException(result);
        }
        return result;
      }

      private org.apache.flume.channel.file.proto.ProtosFactory.LogFileMetaData buildParsed()
          throws com.google.protobuf.InvalidProtocolBufferException {
        org.apache.flume.channel.file.proto.ProtosFactory.LogFileMetaData result = buildPartial();
        if (!result.isInitialized()) {
          throw newUninitializedMessageException(
            result).asInvalidProtocolBufferException();
        }
        return result;
      }

      public org.apache.flume.channel.file.proto.ProtosFactory.LogFileMetaData buildPartial() {
        org.apache.flume.channel.file.proto.ProtosFactory.LogFileMetaData result = new org.apache.flume.channel.file.proto.ProtosFactory.LogFileMetaData(this);
        int from_bitField0_ = bitField0_;
        int to_bitField0_ = 0;
        if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
          to_bitField0_ |= 0x00000001;
        }
        result.version_ = version_;
        if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
          to_bitField0_ |= 0x00000002;
        }
        result.logFileID_ = logFileID_;
        if (((from_bitField0_ & 0x00000004) == 0x00000004)) {
          to_bitField0_ |= 0x00000004;
        }
        result.checkpointPosition_ = checkpointPosition_;
        if (((from_bitField0_ & 0x00000008) == 0x00000008)) {
          to_bitField0_ |= 0x00000008;
        }
        result.checkpointWriteOrderID_ = checkpointWriteOrderID_;
        if (((from_bitField0_ & 0x00000010) == 0x00000010)) {
          to_bitField0_ |= 0x00000010;
        }
        if (encryptionBuilder_ == null) {
          result.encryption_ = encryption_;
        } else {
          result.encryption_ = encryptionBuilder_.build();
        }
        result.bitField0_ = to_bitField0_;
        onBuilt();
        return result;
      }

      public Builder mergeFrom(com.google.protobuf.Message other) {
        if (other instanceof org.apache.flume.channel.file.proto.ProtosFactory.LogFileMetaData) {
          return mergeFrom((org.apache.flume.channel.file.proto.ProtosFactory.LogFileMetaData)other);
        } else {
          super.mergeFrom(other);
          return this;
        }
      }

      public Builder mergeFrom(org.apache.flume.channel.file.proto.ProtosFactory.LogFileMetaData other) {
        if (other == org.apache.flume.channel.file.proto.ProtosFactory.LogFileMetaData.getDefaultInstance()) return this;
        if (other.hasVersion()) {
          setVersion(other.getVersion());
        }
        if (other.hasLogFileID()) {
          setLogFileID(other.getLogFileID());
        }
        if (other.hasCheckpointPosition()) {
          setCheckpointPosition(other.getCheckpointPosition());
        }
        if (other.hasCheckpointWriteOrderID()) {
          setCheckpointWriteOrderID(other.getCheckpointWriteOrderID());
        }
        if (other.hasEncryption()) {
          mergeEncryption(other.getEncryption());
        }
        this.mergeUnknownFields(other.getUnknownFields());
        return this;
      }

      public final boolean isInitialized() {
        if (!hasVersion()) {

          return false;
        }
        if (!hasLogFileID()) {

          return false;
        }
        if (!hasCheckpointPosition()) {

          return false;
        }
        if (!hasCheckpointWriteOrderID()) {

          return false;
        }
        if (hasEncryption()) {
          if (!getEncryption().isInitialized()) {

            return false;
          }
        }
        return true;
      }

      public Builder mergeFrom(
          com.google.protobuf.CodedInputStream input,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws java.io.IOException {
        com.google.protobuf.UnknownFieldSet.Builder unknownFields =
          com.google.protobuf.UnknownFieldSet.newBuilder(
            this.getUnknownFields());
        while (true) {
          int tag = input.readTag();
          switch (tag) {
            case 0:
              this.setUnknownFields(unknownFields.build());
              onChanged();
              return this;
            default: {
              if (!parseUnknownField(input, unknownFields,
                                     extensionRegistry, tag)) {
                this.setUnknownFields(unknownFields.build());
                onChanged();
                return this;
              }
              break;
            }
            case 13: {
              bitField0_ |= 0x00000001;
              version_ = input.readSFixed32();
              break;
            }
            case 21: {
              bitField0_ |= 0x00000002;
              logFileID_ = input.readSFixed32();
              break;
            }
            case 25: {
              bitField0_ |= 0x00000004;
              checkpointPosition_ = input.readSFixed64();
              break;
            }
            case 33: {
              bitField0_ |= 0x00000008;
              checkpointWriteOrderID_ = input.readSFixed64();
              break;
            }
            case 42: {
              org.apache.flume.channel.file.proto.ProtosFactory.LogFileEncryption.Builder subBuilder = org.apache.flume.channel.file.proto.ProtosFactory.LogFileEncryption.newBuilder();
              if (hasEncryption()) {
                subBuilder.mergeFrom(getEncryption());
              }
              input.readMessage(subBuilder, extensionRegistry);
              setEncryption(subBuilder.buildPartial());
              break;
            }
          }
        }
      }

      private int bitField0_;

      // required sfixed32 version = 1;
      private int version_ ;
      public boolean hasVersion() {
        return ((bitField0_ & 0x00000001) == 0x00000001);
      }
      public int getVersion() {
        return version_;
      }
      public Builder setVersion(int value) {
        bitField0_ |= 0x00000001;
        version_ = value;
        onChanged();
        return this;
      }
      public Builder clearVersion() {
        bitField0_ = (bitField0_ & ~0x00000001);
        version_ = 0;
        onChanged();
        return this;
      }

      // required sfixed32 logFileID = 2;
      private int logFileID_ ;
      public boolean hasLogFileID() {
        return ((bitField0_ & 0x00000002) == 0x00000002);
      }
      public int getLogFileID() {
        return logFileID_;
      }
      public Builder setLogFileID(int value) {
        bitField0_ |= 0x00000002;
        logFileID_ = value;
        onChanged();
        return this;
      }
      public Builder clearLogFileID() {
        bitField0_ = (bitField0_ & ~0x00000002);
        logFileID_ = 0;
        onChanged();
        return this;
      }

      // required sfixed64 checkpointPosition = 3;
      private long checkpointPosition_ ;
      public boolean hasCheckpointPosition() {
        return ((bitField0_ & 0x00000004) == 0x00000004);
      }
      public long getCheckpointPosition() {
        return checkpointPosition_;
      }
      public Builder setCheckpointPosition(long value) {
        bitField0_ |= 0x00000004;
        checkpointPosition_ = value;
        onChanged();
        return this;
      }
      public Builder clearCheckpointPosition() {
        bitField0_ = (bitField0_ & ~0x00000004);
        checkpointPosition_ = 0L;
        onChanged();
        return this;
      }

      // required sfixed64 checkpointWriteOrderID = 4;
      private long checkpointWriteOrderID_ ;
      public boolean hasCheckpointWriteOrderID() {
        return ((bitField0_ & 0x00000008) == 0x00000008);
      }
      public long getCheckpointWriteOrderID() {
        return checkpointWriteOrderID_;
      }
      public Builder setCheckpointWriteOrderID(long value) {
        bitField0_ |= 0x00000008;
        checkpointWriteOrderID_ = value;
        onChanged();
        return this;
      }
      public Builder clearCheckpointWriteOrderID() {
        bitField0_ = (bitField0_ & ~0x00000008);
        checkpointWriteOrderID_ = 0L;
        onChanged();
        return this;
      }

      // optional .LogFileEncryption encryption = 5;
      private org.apache.flume.channel.file.proto.ProtosFactory.LogFileEncryption encryption_ = org.apache.flume.channel.file.proto.ProtosFactory.LogFileEncryption.getDefaultInstance();
      private com.google.protobuf.SingleFieldBuilder<
          org.apache.flume.channel.file.proto.ProtosFactory.LogFileEncryption, org.apache.flume.channel.file.proto.ProtosFactory.LogFileEncryption.Builder, org.apache.flume.channel.file.proto.ProtosFactory.LogFileEncryptionOrBuilder> encryptionBuilder_;
      public boolean hasEncryption() {
        return ((bitField0_ & 0x00000010) == 0x00000010);
      }
      public org.apache.flume.channel.file.proto.ProtosFactory.LogFileEncryption getEncryption() {
        if (encryptionBuilder_ == null) {
          return encryption_;
        } else {
          return encryptionBuilder_.getMessage();
        }
      }
      public Builder setEncryption(org.apache.flume.channel.file.proto.ProtosFactory.LogFileEncryption value) {
        if (encryptionBuilder_ == null) {
          if (value == null) {
            throw new NullPointerException();
          }
          encryption_ = value;
          onChanged();
        } else {
          encryptionBuilder_.setMessage(value);
        }
        bitField0_ |= 0x00000010;
        return this;
      }
      public Builder setEncryption(
          org.apache.flume.channel.file.proto.ProtosFactory.LogFileEncryption.Builder builderForValue) {
        if (encryptionBuilder_ == null) {
          encryption_ = builderForValue.build();
          onChanged();
        } else {
          encryptionBuilder_.setMessage(builderForValue.build());
        }
        bitField0_ |= 0x00000010;
        return this;
      }
      public Builder mergeEncryption(org.apache.flume.channel.file.proto.ProtosFactory.LogFileEncryption value) {
        if (encryptionBuilder_ == null) {
          if (((bitField0_ & 0x00000010) == 0x00000010) &&
              encryption_ != org.apache.flume.channel.file.proto.ProtosFactory.LogFileEncryption.getDefaultInstance()) {
            encryption_ =
              org.apache.flume.channel.file.proto.ProtosFactory.LogFileEncryption.newBuilder(encryption_).mergeFrom(value).buildPartial();
          } else {
            encryption_ = value;
          }
          onChanged();
        } else {
          encryptionBuilder_.mergeFrom(value);
        }
        bitField0_ |= 0x00000010;
        return this;
      }
      public Builder clearEncryption() {
        if (encryptionBuilder_ == null) {
          encryption_ = org.apache.flume.channel.file.proto.ProtosFactory.LogFileEncryption.getDefaultInstance();
          onChanged();
        } else {
          encryptionBuilder_.clear();
        }
        bitField0_ = (bitField0_ & ~0x00000010);
        return this;
      }
      public org.apache.flume.channel.file.proto.ProtosFactory.LogFileEncryption.Builder getEncryptionBuilder() {
        bitField0_ |= 0x00000010;
        onChanged();
        return getEncryptionFieldBuilder().getBuilder();
      }
      public org.apache.flume.channel.file.proto.ProtosFactory.LogFileEncryptionOrBuilder getEncryptionOrBuilder() {
        if (encryptionBuilder_ != null) {
          return encryptionBuilder_.getMessageOrBuilder();
        } else {
          return encryption_;
        }
      }
      private com.google.protobuf.SingleFieldBuilder<
          org.apache.flume.channel.file.proto.ProtosFactory.LogFileEncryption, org.apache.flume.channel.file.proto.ProtosFactory.LogFileEncryption.Builder, org.apache.flume.channel.file.proto.ProtosFactory.LogFileEncryptionOrBuilder>
          getEncryptionFieldBuilder() {
        if (encryptionBuilder_ == null) {
          encryptionBuilder_ = new com.google.protobuf.SingleFieldBuilder<
              org.apache.flume.channel.file.proto.ProtosFactory.LogFileEncryption, org.apache.flume.channel.file.proto.ProtosFactory.LogFileEncryption.Builder, org.apache.flume.channel.file.proto.ProtosFactory.LogFileEncryptionOrBuilder>(
                  encryption_,
                  getParentForChildren(),
                  isClean());
          encryption_ = null;
        }
        return encryptionBuilder_;
      }

      // @@protoc_insertion_point(builder_scope:LogFileMetaData)
    }

    static {
      defaultInstance = new LogFileMetaData(true);
      defaultInstance.initFields();
    }

    // @@protoc_insertion_point(class_scope:LogFileMetaData)
  }

  public interface LogFileEncryptionOrBuilder
      extends com.google.protobuf.MessageOrBuilder {

    // required string cipherProvider = 1;
    boolean hasCipherProvider();
    String getCipherProvider();

    // required string keyAlias = 2;
    boolean hasKeyAlias();
    String getKeyAlias();

    // optional bytes parameters = 3;
    boolean hasParameters();
    com.google.protobuf.ByteString getParameters();
  }
  public static final class LogFileEncryption extends
      com.google.protobuf.GeneratedMessage
      implements LogFileEncryptionOrBuilder {
    // Use LogFileEncryption.newBuilder() to construct.
    private LogFileEncryption(Builder builder) {
      super(builder);
    }
    private LogFileEncryption(boolean noInit) {}

    private static final LogFileEncryption defaultInstance;
    public static LogFileEncryption getDefaultInstance() {
      return defaultInstance;
    }

    public LogFileEncryption getDefaultInstanceForType() {
      return defaultInstance;
    }

    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return org.apache.flume.channel.file.proto.ProtosFactory.internal_static_LogFileEncryption_descriptor;
    }

    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return org.apache.flume.channel.file.proto.ProtosFactory.internal_static_LogFileEncryption_fieldAccessorTable;
    }

    private int bitField0_;
    // required string cipherProvider = 1;
    public static final int CIPHERPROVIDER_FIELD_NUMBER = 1;
    private java.lang.Object cipherProvider_;
    public boolean hasCipherProvider() {
      return ((bitField0_ & 0x00000001) == 0x00000001);
    }
    public String getCipherProvider() {
      java.lang.Object ref = cipherProvider_;
      if (ref instanceof String) {
        return (String) ref;
      } else {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        String s = bs.toStringUtf8();
        if (com.google.protobuf.Internal.isValidUtf8(bs)) {
          cipherProvider_ = s;
        }
        return s;
      }
    }
    private com.google.protobuf.ByteString getCipherProviderBytes() {
      java.lang.Object ref = cipherProvider_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b =
            com.google.protobuf.ByteString.copyFromUtf8((String) ref);
        cipherProvider_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }

    // required string keyAlias = 2;
    public static final int KEYALIAS_FIELD_NUMBER = 2;
    private java.lang.Object keyAlias_;
    public boolean hasKeyAlias() {
      return ((bitField0_ & 0x00000002) == 0x00000002);
    }
    public String getKeyAlias() {
      java.lang.Object ref = keyAlias_;
      if (ref instanceof String) {
        return (String) ref;
      } else {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        String s = bs.toStringUtf8();
        if (com.google.protobuf.Internal.isValidUtf8(bs)) {
          keyAlias_ = s;
        }
        return s;
      }
    }
    private com.google.protobuf.ByteString getKeyAliasBytes() {
      java.lang.Object ref = keyAlias_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b =
            com.google.protobuf.ByteString.copyFromUtf8((String) ref);
        keyAlias_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }

    // optional bytes parameters = 3;
    public static final int PARAMETERS_FIELD_NUMBER = 3;
    private com.google.protobuf.ByteString parameters_;
    public boolean hasParameters() {
      return ((bitField0_ & 0x00000004) == 0x00000004);
    }
    public com.google.protobuf.ByteString getParameters() {
      return parameters_;
    }

    private void initFields() {
      cipherProvider_ = "";
      keyAlias_ = "";
      parameters_ = com.google.protobuf.ByteString.EMPTY;
    }
    private byte memoizedIsInitialized = -1;
    public final boolean isInitialized() {
      byte isInitialized = memoizedIsInitialized;
      if (isInitialized != -1) return isInitialized == 1;

      if (!hasCipherProvider()) {
        memoizedIsInitialized = 0;
        return false;
      }
      if (!hasKeyAlias()) {
        memoizedIsInitialized = 0;
        return false;
      }
      memoizedIsInitialized = 1;
      return true;
    }

    public void writeTo(com.google.protobuf.CodedOutputStream output)
                        throws java.io.IOException {
      getSerializedSize();
      if (((bitField0_ & 0x00000001) == 0x00000001)) {
        output.writeBytes(1, getCipherProviderBytes());
      }
      if (((bitField0_ & 0x00000002) == 0x00000002)) {
        output.writeBytes(2, getKeyAliasBytes());
      }
      if (((bitField0_ & 0x00000004) == 0x00000004)) {
        output.writeBytes(3, parameters_);
      }
      getUnknownFields().writeTo(output);
    }

    private int memoizedSerializedSize = -1;
    public int getSerializedSize() {
      int size = memoizedSerializedSize;
      if (size != -1) return size;

      size = 0;
      if (((bitField0_ & 0x00000001) == 0x00000001)) {
        size += com.google.protobuf.CodedOutputStream
          .computeBytesSize(1, getCipherProviderBytes());
      }
      if (((bitField0_ & 0x00000002) == 0x00000002)) {
        size += com.google.protobuf.CodedOutputStream
          .computeBytesSize(2, getKeyAliasBytes());
      }
      if (((bitField0_ & 0x00000004) == 0x00000004)) {
        size += com.google.protobuf.CodedOutputStream
          .computeBytesSize(3, parameters_);
      }
      size += getUnknownFields().getSerializedSize();
      memoizedSerializedSize = size;
      return size;
    }

    private static final long serialVersionUID = 0L;
    @java.lang.Override
    protected java.lang.Object writeReplace()
        throws java.io.ObjectStreamException {
      return super.writeReplace();
    }

    public static org.apache.flume.channel.file.proto.ProtosFactory.LogFileEncryption parseFrom(
        com.google.protobuf.ByteString data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return newBuilder().mergeFrom(data).buildParsed();
    }
    public static org.apache.flume.channel.file.proto.ProtosFactory.LogFileEncryption parseFrom(
        com.google.protobuf.ByteString data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return newBuilder().mergeFrom(data, extensionRegistry)
               .buildParsed();
    }
    public static org.apache.flume.channel.file.proto.ProtosFactory.LogFileEncryption parseFrom(byte[] data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return newBuilder().mergeFrom(data).buildParsed();
    }
    public static org.apache.flume.channel.file.proto.ProtosFactory.LogFileEncryption parseFrom(
        byte[] data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return newBuilder().mergeFrom(data, extensionRegistry)
               .buildParsed();
    }
    public static org.apache.flume.channel.file.proto.ProtosFactory.LogFileEncryption parseFrom(java.io.InputStream input)
        throws java.io.IOException {
      return newBuilder().mergeFrom(input).buildParsed();
    }
    public static org.apache.flume.channel.file.proto.ProtosFactory.LogFileEncryption parseFrom(
        java.io.InputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return newBuilder().mergeFrom(input, extensionRegistry)
               .buildParsed();
    }
    public static org.apache.flume.channel.file.proto.ProtosFactory.LogFileEncryption parseDelimitedFrom(java.io.InputStream input)
        throws java.io.IOException {
      Builder builder = newBuilder();
      if (builder.mergeDelimitedFrom(input)) {
        return builder.buildParsed();
      } else {
        return null;
      }
    }
    public static org.apache.flume.channel.file.proto.ProtosFactory.LogFileEncryption parseDelimitedFrom(
        java.io.InputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      Builder builder = newBuilder();
      if (builder.mergeDelimitedFrom(input, extensionRegistry)) {
        return builder.buildParsed();
      } else {
        return null;
      }
    }
    public static org.apache.flume.channel.file.proto.ProtosFactory.LogFileEncryption parseFrom(
        com.google.protobuf.CodedInputStream input)
        throws java.io.IOException {
      return newBuilder().mergeFrom(input).buildParsed();
    }
    public static org.apache.flume.channel.file.proto.ProtosFactory.LogFileEncryption parseFrom(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return newBuilder().mergeFrom(input, extensionRegistry)
               .buildParsed();
    }

    public static Builder newBuilder() { return Builder.create(); }
    public Builder newBuilderForType() { return newBuilder(); }
    public static Builder newBuilder(org.apache.flume.channel.file.proto.ProtosFactory.LogFileEncryption prototype) {
      return newBuilder().mergeFrom(prototype);
    }
    public Builder toBuilder() { return newBuilder(this); }

    @java.lang.Override
    protected Builder newBuilderForType(
        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
      Builder builder = new Builder(parent);
      return builder;
    }
    public static final class Builder extends
        com.google.protobuf.GeneratedMessage.Builder<Builder>
       implements org.apache.flume.channel.file.proto.ProtosFactory.LogFileEncryptionOrBuilder {
      public static final com.google.protobuf.Descriptors.Descriptor
          getDescriptor() {
        return org.apache.flume.channel.file.proto.ProtosFactory.internal_static_LogFileEncryption_descriptor;
      }

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
          internalGetFieldAccessorTable() {
        return org.apache.flume.channel.file.proto.ProtosFactory.internal_static_LogFileEncryption_fieldAccessorTable;
      }

      // Construct using org.apache.flume.channel.file.proto.ProtosFactory.LogFileEncryption.newBuilder()
      private Builder() {
        maybeForceBuilderInitialization();
      }

      private Builder(BuilderParent parent) {
        super(parent);
        maybeForceBuilderInitialization();
      }
      private void maybeForceBuilderInitialization() {
        if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
        }
      }
      private static Builder create() {
        return new Builder();
      }

      public Builder clear() {
        super.clear();
        cipherProvider_ = "";
        bitField0_ = (bitField0_ & ~0x00000001);
        keyAlias_ = "";
        bitField0_ = (bitField0_ & ~0x00000002);
        parameters_ = com.google.protobuf.ByteString.EMPTY;
        bitField0_ = (bitField0_ & ~0x00000004);
        return this;
      }

      public Builder clone() {
        return create().mergeFrom(buildPartial());
      }

      public com.google.protobuf.Descriptors.Descriptor
          getDescriptorForType() {
        return org.apache.flume.channel.file.proto.ProtosFactory.LogFileEncryption.getDescriptor();
      }

      public org.apache.flume.channel.file.proto.ProtosFactory.LogFileEncryption getDefaultInstanceForType() {
        return org.apache.flume.channel.file.proto.ProtosFactory.LogFileEncryption.getDefaultInstance();
      }

      public org.apache.flume.channel.file.proto.ProtosFactory.LogFileEncryption build() {
        org.apache.flume.channel.file.proto.ProtosFactory.LogFileEncryption result = buildPartial();
        if (!result.isInitialized()) {
          throw newUninitializedMessageException(result);
        }
        return result;
      }

      private org.apache.flume.channel.file.proto.ProtosFactory.LogFileEncryption buildParsed()
          throws com.google.protobuf.InvalidProtocolBufferException {
        org.apache.flume.channel.file.proto.ProtosFactory.LogFileEncryption result = buildPartial();
        if (!result.isInitialized()) {
          throw newUninitializedMessageException(
            result).asInvalidProtocolBufferException();
        }
        return result;
      }

      public org.apache.flume.channel.file.proto.ProtosFactory.LogFileEncryption buildPartial() {
        org.apache.flume.channel.file.proto.ProtosFactory.LogFileEncryption result = new org.apache.flume.channel.file.proto.ProtosFactory.LogFileEncryption(this);
        int from_bitField0_ = bitField0_;
        int to_bitField0_ = 0;
        if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
          to_bitField0_ |= 0x00000001;
        }
        result.cipherProvider_ = cipherProvider_;
        if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
          to_bitField0_ |= 0x00000002;
        }
        result.keyAlias_ = keyAlias_;
        if (((from_bitField0_ & 0x00000004) == 0x00000004)) {
          to_bitField0_ |= 0x00000004;
        }
        result.parameters_ = parameters_;
        result.bitField0_ = to_bitField0_;
        onBuilt();
        return result;
      }

      public Builder mergeFrom(com.google.protobuf.Message other) {
        if (other instanceof org.apache.flume.channel.file.proto.ProtosFactory.LogFileEncryption) {
          return mergeFrom((org.apache.flume.channel.file.proto.ProtosFactory.LogFileEncryption)other);
        } else {
          super.mergeFrom(other);
          return this;
        }
      }

      public Builder mergeFrom(org.apache.flume.channel.file.proto.ProtosFactory.LogFileEncryption other) {
        if (other == org.apache.flume.channel.file.proto.ProtosFactory.LogFileEncryption.getDefaultInstance()) return this;
        if (other.hasCipherProvider()) {
          setCipherProvider(other.getCipherProvider());
        }
        if (other.hasKeyAlias()) {
          setKeyAlias(other.getKeyAlias());
        }
        if (other.hasParameters()) {
          setParameters(other.getParameters());
        }
        this.mergeUnknownFields(other.getUnknownFields());
        return this;
      }

      public final boolean isInitialized() {
        if (!hasCipherProvider()) {

          return false;
        }
        if (!hasKeyAlias()) {

          return false;
        }
        return true;
      }

      public Builder mergeFrom(
          com.google.protobuf.CodedInputStream input,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws java.io.IOException {
        com.google.protobuf.UnknownFieldSet.Builder unknownFields =
          com.google.protobuf.UnknownFieldSet.newBuilder(
            this.getUnknownFields());
        while (true) {
          int tag = input.readTag();
          switch (tag) {
            case 0:
              this.setUnknownFields(unknownFields.build());
              onChanged();
              return this;
            default: {
              if (!parseUnknownField(input, unknownFields,
                                     extensionRegistry, tag)) {
                this.setUnknownFields(unknownFields.build());
                onChanged();
                return this;
              }
              break;
            }
            case 10: {
              bitField0_ |= 0x00000001;
              cipherProvider_ = input.readBytes();
              break;
            }
            case 18: {
              bitField0_ |= 0x00000002;
              keyAlias_ = input.readBytes();
              break;
            }
            case 26: {
              bitField0_ |= 0x00000004;
              parameters_ = input.readBytes();
              break;
            }
          }
        }
      }

      private int bitField0_;

      // required string cipherProvider = 1;
      private java.lang.Object cipherProvider_ = "";
      public boolean hasCipherProvider() {
        return ((bitField0_ & 0x00000001) == 0x00000001);
      }
      public String getCipherProvider() {
        java.lang.Object ref = cipherProvider_;
        if (!(ref instanceof String)) {
          String s = ((com.google.protobuf.ByteString) ref).toStringUtf8();
          cipherProvider_ = s;
          return s;
        } else {
          return (String) ref;
        }
      }
      public Builder setCipherProvider(String value) {
        if (value == null) {
    throw new NullPointerException();
  }
  bitField0_ |= 0x00000001;
        cipherProvider_ = value;
        onChanged();
        return this;
      }
      public Builder clearCipherProvider() {
        bitField0_ = (bitField0_ & ~0x00000001);
        cipherProvider_ = getDefaultInstance().getCipherProvider();
        onChanged();
        return this;
      }
      void setCipherProvider(com.google.protobuf.ByteString value) {
        bitField0_ |= 0x00000001;
        cipherProvider_ = value;
        onChanged();
      }

      // required string keyAlias = 2;
      private java.lang.Object keyAlias_ = "";
      public boolean hasKeyAlias() {
        return ((bitField0_ & 0x00000002) == 0x00000002);
      }
      public String getKeyAlias() {
        java.lang.Object ref = keyAlias_;
        if (!(ref instanceof String)) {
          String s = ((com.google.protobuf.ByteString) ref).toStringUtf8();
          keyAlias_ = s;
          return s;
        } else {
          return (String) ref;
        }
      }
      public Builder setKeyAlias(String value) {
        if (value == null) {
    throw new NullPointerException();
  }
  bitField0_ |= 0x00000002;
        keyAlias_ = value;
        onChanged();
        return this;
      }
      public Builder clearKeyAlias() {
        bitField0_ = (bitField0_ & ~0x00000002);
        keyAlias_ = getDefaultInstance().getKeyAlias();
        onChanged();
        return this;
      }
      void setKeyAlias(com.google.protobuf.ByteString value) {
        bitField0_ |= 0x00000002;
        keyAlias_ = value;
        onChanged();
      }

      // optional bytes parameters = 3;
      private com.google.protobuf.ByteString parameters_ = com.google.protobuf.ByteString.EMPTY;
      public boolean hasParameters() {
        return ((bitField0_ & 0x00000004) == 0x00000004);
      }
      public com.google.protobuf.ByteString getParameters() {
        return parameters_;
      }
      public Builder setParameters(com.google.protobuf.ByteString value) {
        if (value == null) {
    throw new NullPointerException();
  }
  bitField0_ |= 0x00000004;
        parameters_ = value;
        onChanged();
        return this;
      }
      public Builder clearParameters() {
        bitField0_ = (bitField0_ & ~0x00000004);
        parameters_ = getDefaultInstance().getParameters();
        onChanged();
        return this;
      }

      // @@protoc_insertion_point(builder_scope:LogFileEncryption)
    }

    static {
      defaultInstance = new LogFileEncryption(true);
      defaultInstance.initFields();
    }

    // @@protoc_insertion_point(class_scope:LogFileEncryption)
  }

  public interface TransactionEventHeaderOrBuilder
      extends com.google.protobuf.MessageOrBuilder {

    // required sfixed32 type = 1;
    boolean hasType();
    int getType();

    // required sfixed64 transactionID = 2;
    boolean hasTransactionID();
    long getTransactionID();

    // required sfixed64 writeOrderID = 3;
    boolean hasWriteOrderID();
    long getWriteOrderID();
  }
  public static final class TransactionEventHeader extends
      com.google.protobuf.GeneratedMessage
      implements TransactionEventHeaderOrBuilder {
    // Use TransactionEventHeader.newBuilder() to construct.
    private TransactionEventHeader(Builder builder) {
      super(builder);
    }
    private TransactionEventHeader(boolean noInit) {}

    private static final TransactionEventHeader defaultInstance;
    public static TransactionEventHeader getDefaultInstance() {
      return defaultInstance;
    }

    public TransactionEventHeader getDefaultInstanceForType() {
      return defaultInstance;
    }

    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return org.apache.flume.channel.file.proto.ProtosFactory.internal_static_TransactionEventHeader_descriptor;
    }

    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return org.apache.flume.channel.file.proto.ProtosFactory.internal_static_TransactionEventHeader_fieldAccessorTable;
    }

    private int bitField0_;
    // required sfixed32 type = 1;
    public static final int TYPE_FIELD_NUMBER = 1;
    private int type_;
    public boolean hasType() {
      return ((bitField0_ & 0x00000001) == 0x00000001);
    }
    public int getType() {
      return type_;
    }

    // required sfixed64 transactionID = 2;
    public static final int TRANSACTIONID_FIELD_NUMBER = 2;
    private long transactionID_;
    public boolean hasTransactionID() {
      return ((bitField0_ & 0x00000002) == 0x00000002);
    }
    public long getTransactionID() {
      return transactionID_;
    }

    // required sfixed64 writeOrderID = 3;
    public static final int WRITEORDERID_FIELD_NUMBER = 3;
    private long writeOrderID_;
    public boolean hasWriteOrderID() {
      return ((bitField0_ & 0x00000004) == 0x00000004);
    }
    public long getWriteOrderID() {
      return writeOrderID_;
    }

    private void initFields() {
      type_ = 0;
      transactionID_ = 0L;
      writeOrderID_ = 0L;
    }
    private byte memoizedIsInitialized = -1;
    public final boolean isInitialized() {
      byte isInitialized = memoizedIsInitialized;
      if (isInitialized != -1) return isInitialized == 1;

      if (!hasType()) {
        memoizedIsInitialized = 0;
        return false;
      }
      if (!hasTransactionID()) {
        memoizedIsInitialized = 0;
        return false;
      }
      if (!hasWriteOrderID()) {
        memoizedIsInitialized = 0;
        return false;
      }
      memoizedIsInitialized = 1;
      return true;
    }

    public void writeTo(com.google.protobuf.CodedOutputStream output)
                        throws java.io.IOException {
      getSerializedSize();
      if (((bitField0_ & 0x00000001) == 0x00000001)) {
        output.writeSFixed32(1, type_);
      }
      if (((bitField0_ & 0x00000002) == 0x00000002)) {
        output.writeSFixed64(2, transactionID_);
      }
      if (((bitField0_ & 0x00000004) == 0x00000004)) {
        output.writeSFixed64(3, writeOrderID_);
      }
      getUnknownFields().writeTo(output);
    }

    private int memoizedSerializedSize = -1;
    public int getSerializedSize() {
      int size = memoizedSerializedSize;
      if (size != -1) return size;

      size = 0;
      if (((bitField0_ & 0x00000001) == 0x00000001)) {
        size += com.google.protobuf.CodedOutputStream
          .computeSFixed32Size(1, type_);
      }
      if (((bitField0_ & 0x00000002) == 0x00000002)) {
        size += com.google.protobuf.CodedOutputStream
          .computeSFixed64Size(2, transactionID_);
      }
      if (((bitField0_ & 0x00000004) == 0x00000004)) {
        size += com.google.protobuf.CodedOutputStream
          .computeSFixed64Size(3, writeOrderID_);
      }
      size += getUnknownFields().getSerializedSize();
      memoizedSerializedSize = size;
      return size;
    }

    private static final long serialVersionUID = 0L;
    @java.lang.Override
    protected java.lang.Object writeReplace()
        throws java.io.ObjectStreamException {
      return super.writeReplace();
    }

    public static org.apache.flume.channel.file.proto.ProtosFactory.TransactionEventHeader parseFrom(
        com.google.protobuf.ByteString data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return newBuilder().mergeFrom(data).buildParsed();
    }
    public static org.apache.flume.channel.file.proto.ProtosFactory.TransactionEventHeader parseFrom(
        com.google.protobuf.ByteString data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return newBuilder().mergeFrom(data, extensionRegistry)
               .buildParsed();
    }
    public static org.apache.flume.channel.file.proto.ProtosFactory.TransactionEventHeader parseFrom(byte[] data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return newBuilder().mergeFrom(data).buildParsed();
    }
    public static org.apache.flume.channel.file.proto.ProtosFactory.TransactionEventHeader parseFrom(
        byte[] data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return newBuilder().mergeFrom(data, extensionRegistry)
               .buildParsed();
    }
    public static org.apache.flume.channel.file.proto.ProtosFactory.TransactionEventHeader parseFrom(java.io.InputStream input)
        throws java.io.IOException {
      return newBuilder().mergeFrom(input).buildParsed();
    }
    public static org.apache.flume.channel.file.proto.ProtosFactory.TransactionEventHeader parseFrom(
        java.io.InputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return newBuilder().mergeFrom(input, extensionRegistry)
               .buildParsed();
    }
    public static org.apache.flume.channel.file.proto.ProtosFactory.TransactionEventHeader parseDelimitedFrom(java.io.InputStream input)
        throws java.io.IOException {
      Builder builder = newBuilder();
      if (builder.mergeDelimitedFrom(input)) {
        return builder.buildParsed();
      } else {
        return null;
      }
    }
    public static org.apache.flume.channel.file.proto.ProtosFactory.TransactionEventHeader parseDelimitedFrom(
        java.io.InputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      Builder builder = newBuilder();
      if (builder.mergeDelimitedFrom(input, extensionRegistry)) {
        return builder.buildParsed();
      } else {
        return null;
      }
    }
    public static org.apache.flume.channel.file.proto.ProtosFactory.TransactionEventHeader parseFrom(
        com.google.protobuf.CodedInputStream input)
        throws java.io.IOException {
      return newBuilder().mergeFrom(input).buildParsed();
    }
    public static org.apache.flume.channel.file.proto.ProtosFactory.TransactionEventHeader parseFrom(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return newBuilder().mergeFrom(input, extensionRegistry)
               .buildParsed();
    }

    public static Builder newBuilder() { return Builder.create(); }
    public Builder newBuilderForType() { return newBuilder(); }
    public static Builder newBuilder(org.apache.flume.channel.file.proto.ProtosFactory.TransactionEventHeader prototype) {
      return newBuilder().mergeFrom(prototype);
    }
    public Builder toBuilder() { return newBuilder(this); }

    @java.lang.Override
    protected Builder newBuilderForType(
        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
      Builder builder = new Builder(parent);
      return builder;
    }
    public static final class Builder extends
        com.google.protobuf.GeneratedMessage.Builder<Builder>
       implements org.apache.flume.channel.file.proto.ProtosFactory.TransactionEventHeaderOrBuilder {
      public static final com.google.protobuf.Descriptors.Descriptor
          getDescriptor() {
        return org.apache.flume.channel.file.proto.ProtosFactory.internal_static_TransactionEventHeader_descriptor;
      }

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
          internalGetFieldAccessorTable() {
        return org.apache.flume.channel.file.proto.ProtosFactory.internal_static_TransactionEventHeader_fieldAccessorTable;
      }

      // Construct using org.apache.flume.channel.file.proto.ProtosFactory.TransactionEventHeader.newBuilder()
      private Builder() {
        maybeForceBuilderInitialization();
      }

      private Builder(BuilderParent parent) {
        super(parent);
        maybeForceBuilderInitialization();
      }
      private void maybeForceBuilderInitialization() {
        if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
        }
      }
      private static Builder create() {
        return new Builder();
      }

      public Builder clear() {
        super.clear();
        type_ = 0;
        bitField0_ = (bitField0_ & ~0x00000001);
        transactionID_ = 0L;
        bitField0_ = (bitField0_ & ~0x00000002);
        writeOrderID_ = 0L;
        bitField0_ = (bitField0_ & ~0x00000004);
        return this;
      }

      public Builder clone() {
        return create().mergeFrom(buildPartial());
      }

      public com.google.protobuf.Descriptors.Descriptor
          getDescriptorForType() {
        return org.apache.flume.channel.file.proto.ProtosFactory.TransactionEventHeader.getDescriptor();
      }

      public org.apache.flume.channel.file.proto.ProtosFactory.TransactionEventHeader getDefaultInstanceForType() {
        return org.apache.flume.channel.file.proto.ProtosFactory.TransactionEventHeader.getDefaultInstance();
      }

      public org.apache.flume.channel.file.proto.ProtosFactory.TransactionEventHeader build() {
        org.apache.flume.channel.file.proto.ProtosFactory.TransactionEventHeader result = buildPartial();
        if (!result.isInitialized()) {
          throw newUninitializedMessageException(result);
        }
        return result;
      }

      private org.apache.flume.channel.file.proto.ProtosFactory.TransactionEventHeader buildParsed()
          throws com.google.protobuf.InvalidProtocolBufferException {
        org.apache.flume.channel.file.proto.ProtosFactory.TransactionEventHeader result = buildPartial();
        if (!result.isInitialized()) {
          throw newUninitializedMessageException(
            result).asInvalidProtocolBufferException();
        }
        return result;
      }

      public org.apache.flume.channel.file.proto.ProtosFactory.TransactionEventHeader buildPartial() {
        org.apache.flume.channel.file.proto.ProtosFactory.TransactionEventHeader result = new org.apache.flume.channel.file.proto.ProtosFactory.TransactionEventHeader(this);
        int from_bitField0_ = bitField0_;
        int to_bitField0_ = 0;
        if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
          to_bitField0_ |= 0x00000001;
        }
        result.type_ = type_;
        if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
          to_bitField0_ |= 0x00000002;
        }
        result.transactionID_ = transactionID_;
        if (((from_bitField0_ & 0x00000004) == 0x00000004)) {
          to_bitField0_ |= 0x00000004;
        }
        result.writeOrderID_ = writeOrderID_;
        result.bitField0_ = to_bitField0_;
        onBuilt();
        return result;
      }

      public Builder mergeFrom(com.google.protobuf.Message other) {
        if (other instanceof org.apache.flume.channel.file.proto.ProtosFactory.TransactionEventHeader) {
          return mergeFrom((org.apache.flume.channel.file.proto.ProtosFactory.TransactionEventHeader)other);
        } else {
          super.mergeFrom(other);
          return this;
        }
      }

      public Builder mergeFrom(org.apache.flume.channel.file.proto.ProtosFactory.TransactionEventHeader other) {
        if (other == org.apache.flume.channel.file.proto.ProtosFactory.TransactionEventHeader.getDefaultInstance()) return this;
        if (other.hasType()) {
          setType(other.getType());
        }
        if (other.hasTransactionID()) {
          setTransactionID(other.getTransactionID());
        }
        if (other.hasWriteOrderID()) {
          setWriteOrderID(other.getWriteOrderID());
        }
        this.mergeUnknownFields(other.getUnknownFields());
        return this;
      }

      public final boolean isInitialized() {
        if (!hasType()) {

          return false;
        }
        if (!hasTransactionID()) {

          return false;
        }
        if (!hasWriteOrderID()) {

          return false;
        }
        return true;
      }

      public Builder mergeFrom(
          com.google.protobuf.CodedInputStream input,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws java.io.IOException {
        com.google.protobuf.UnknownFieldSet.Builder unknownFields =
          com.google.protobuf.UnknownFieldSet.newBuilder(
            this.getUnknownFields());
        while (true) {
          int tag = input.readTag();
          switch (tag) {
            case 0:
              this.setUnknownFields(unknownFields.build());
              onChanged();
              return this;
            default: {
              if (!parseUnknownField(input, unknownFields,
                                     extensionRegistry, tag)) {
                this.setUnknownFields(unknownFields.build());
                onChanged();
                return this;
              }
              break;
            }
            case 13: {
              bitField0_ |= 0x00000001;
              type_ = input.readSFixed32();
              break;
            }
            case 17: {
              bitField0_ |= 0x00000002;
              transactionID_ = input.readSFixed64();
              break;
            }
            case 25: {
              bitField0_ |= 0x00000004;
              writeOrderID_ = input.readSFixed64();
              break;
            }
          }
        }
      }

      private int bitField0_;

      // required sfixed32 type = 1;
      private int type_ ;
      public boolean hasType() {
        return ((bitField0_ & 0x00000001) == 0x00000001);
      }
      public int getType() {
        return type_;
      }
      public Builder setType(int value) {
        bitField0_ |= 0x00000001;
        type_ = value;
        onChanged();
        return this;
      }
      public Builder clearType() {
        bitField0_ = (bitField0_ & ~0x00000001);
        type_ = 0;
        onChanged();
        return this;
      }

      // required sfixed64 transactionID = 2;
      private long transactionID_ ;
      public boolean hasTransactionID() {
        return ((bitField0_ & 0x00000002) == 0x00000002);
      }
      public long getTransactionID() {
        return transactionID_;
      }
      public Builder setTransactionID(long value) {
        bitField0_ |= 0x00000002;
        transactionID_ = value;
        onChanged();
        return this;
      }
      public Builder clearTransactionID() {
        bitField0_ = (bitField0_ & ~0x00000002);
        transactionID_ = 0L;
        onChanged();
        return this;
      }

      // required sfixed64 writeOrderID = 3;
      private long writeOrderID_ ;
      public boolean hasWriteOrderID() {
        return ((bitField0_ & 0x00000004) == 0x00000004);
      }
      public long getWriteOrderID() {
        return writeOrderID_;
      }
      public Builder setWriteOrderID(long value) {
        bitField0_ |= 0x00000004;
        writeOrderID_ = value;
        onChanged();
        return this;
      }
      public Builder clearWriteOrderID() {
        bitField0_ = (bitField0_ & ~0x00000004);
        writeOrderID_ = 0L;
        onChanged();
        return this;
      }

      // @@protoc_insertion_point(builder_scope:TransactionEventHeader)
    }

    static {
      defaultInstance = new TransactionEventHeader(true);
      defaultInstance.initFields();
    }

    // @@protoc_insertion_point(class_scope:TransactionEventHeader)
  }

  public interface PutOrBuilder
      extends com.google.protobuf.MessageOrBuilder {

    // required .FlumeEvent event = 1;
    boolean hasEvent();
    org.apache.flume.channel.file.proto.ProtosFactory.FlumeEvent getEvent();
    org.apache.flume.channel.file.proto.ProtosFactory.FlumeEventOrBuilder getEventOrBuilder();
  }
  public static final class Put extends
      com.google.protobuf.GeneratedMessage
      implements PutOrBuilder {
    // Use Put.newBuilder() to construct.
    private Put(Builder builder) {
      super(builder);
    }
    private Put(boolean noInit) {}

    private static final Put defaultInstance;
    public static Put getDefaultInstance() {
      return defaultInstance;
    }

    public Put getDefaultInstanceForType() {
      return defaultInstance;
    }

    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return org.apache.flume.channel.file.proto.ProtosFactory.internal_static_Put_descriptor;
    }

    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return org.apache.flume.channel.file.proto.ProtosFactory.internal_static_Put_fieldAccessorTable;
    }

    private int bitField0_;
    // required .FlumeEvent event = 1;
    public static final int EVENT_FIELD_NUMBER = 1;
    private org.apache.flume.channel.file.proto.ProtosFactory.FlumeEvent event_;
    public boolean hasEvent() {
      return ((bitField0_ & 0x00000001) == 0x00000001);
    }
    public org.apache.flume.channel.file.proto.ProtosFactory.FlumeEvent getEvent() {
      return event_;
    }
    public org.apache.flume.channel.file.proto.ProtosFactory.FlumeEventOrBuilder getEventOrBuilder() {
      return event_;
    }

    private void initFields() {
      event_ = org.apache.flume.channel.file.proto.ProtosFactory.FlumeEvent.getDefaultInstance();
    }
    private byte memoizedIsInitialized = -1;
    public final boolean isInitialized() {
      byte isInitialized = memoizedIsInitialized;
      if (isInitialized != -1) return isInitialized == 1;

      if (!hasEvent()) {
        memoizedIsInitialized = 0;
        return false;
      }
      if (!getEvent().isInitialized()) {
        memoizedIsInitialized = 0;
        return false;
      }
      memoizedIsInitialized = 1;
      return true;
    }

    public void writeTo(com.google.protobuf.CodedOutputStream output)
                        throws java.io.IOException {
      getSerializedSize();
      if (((bitField0_ & 0x00000001) == 0x00000001)) {
        output.writeMessage(1, event_);
      }
      getUnknownFields().writeTo(output);
    }

    private int memoizedSerializedSize = -1;
    public int getSerializedSize() {
      int size = memoizedSerializedSize;
      if (size != -1) return size;

      size = 0;
      if (((bitField0_ & 0x00000001) == 0x00000001)) {
        size += com.google.protobuf.CodedOutputStream
          .computeMessageSize(1, event_);
      }
      size += getUnknownFields().getSerializedSize();
      memoizedSerializedSize = size;
      return size;
    }

    private static final long serialVersionUID = 0L;
    @java.lang.Override
    protected java.lang.Object writeReplace()
        throws java.io.ObjectStreamException {
      return super.writeReplace();
    }

    public static org.apache.flume.channel.file.proto.ProtosFactory.Put parseFrom(
        com.google.protobuf.ByteString data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return newBuilder().mergeFrom(data).buildParsed();
    }
    public static org.apache.flume.channel.file.proto.ProtosFactory.Put parseFrom(
        com.google.protobuf.ByteString data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return newBuilder().mergeFrom(data, extensionRegistry)
               .buildParsed();
    }
    public static org.apache.flume.channel.file.proto.ProtosFactory.Put parseFrom(byte[] data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return newBuilder().mergeFrom(data).buildParsed();
    }
    public static org.apache.flume.channel.file.proto.ProtosFactory.Put parseFrom(
        byte[] data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return newBuilder().mergeFrom(data, extensionRegistry)
               .buildParsed();
    }
    public static org.apache.flume.channel.file.proto.ProtosFactory.Put parseFrom(java.io.InputStream input)
        throws java.io.IOException {
      return newBuilder().mergeFrom(input).buildParsed();
    }
    public static org.apache.flume.channel.file.proto.ProtosFactory.Put parseFrom(
        java.io.InputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return newBuilder().mergeFrom(input, extensionRegistry)
               .buildParsed();
    }
    public static org.apache.flume.channel.file.proto.ProtosFactory.Put parseDelimitedFrom(java.io.InputStream input)
        throws java.io.IOException {
      Builder builder = newBuilder();
      if (builder.mergeDelimitedFrom(input)) {
        return builder.buildParsed();
      } else {
        return null;
      }
    }
    public static org.apache.flume.channel.file.proto.ProtosFactory.Put parseDelimitedFrom(
        java.io.InputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      Builder builder = newBuilder();
      if (builder.mergeDelimitedFrom(input, extensionRegistry)) {
        return builder.buildParsed();
      } else {
        return null;
      }
    }
    public static org.apache.flume.channel.file.proto.ProtosFactory.Put parseFrom(
        com.google.protobuf.CodedInputStream input)
        throws java.io.IOException {
      return newBuilder().mergeFrom(input).buildParsed();
    }
    public static org.apache.flume.channel.file.proto.ProtosFactory.Put parseFrom(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return newBuilder().mergeFrom(input, extensionRegistry)
               .buildParsed();
    }

    public static Builder newBuilder() { return Builder.create(); }
    public Builder newBuilderForType() { return newBuilder(); }
    public static Builder newBuilder(org.apache.flume.channel.file.proto.ProtosFactory.Put prototype) {
      return newBuilder().mergeFrom(prototype);
    }
    public Builder toBuilder() { return newBuilder(this); }

    @java.lang.Override
    protected Builder newBuilderForType(
        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
      Builder builder = new Builder(parent);
      return builder;
    }
    public static final class Builder extends
        com.google.protobuf.GeneratedMessage.Builder<Builder>
       implements org.apache.flume.channel.file.proto.ProtosFactory.PutOrBuilder {
      public static final com.google.protobuf.Descriptors.Descriptor
          getDescriptor() {
        return org.apache.flume.channel.file.proto.ProtosFactory.internal_static_Put_descriptor;
      }

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
          internalGetFieldAccessorTable() {
        return org.apache.flume.channel.file.proto.ProtosFactory.internal_static_Put_fieldAccessorTable;
      }

      // Construct using org.apache.flume.channel.file.proto.ProtosFactory.Put.newBuilder()
      private Builder() {
        maybeForceBuilderInitialization();
      }

      private Builder(BuilderParent parent) {
        super(parent);
        maybeForceBuilderInitialization();
      }
      private void maybeForceBuilderInitialization() {
        if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
          getEventFieldBuilder();
        }
      }
      private static Builder create() {
        return new Builder();
      }

      public Builder clear() {
        super.clear();
        if (eventBuilder_ == null) {
          event_ = org.apache.flume.channel.file.proto.ProtosFactory.FlumeEvent.getDefaultInstance();
        } else {
          eventBuilder_.clear();
        }
        bitField0_ = (bitField0_ & ~0x00000001);
        return this;
      }

      public Builder clone() {
        return create().mergeFrom(buildPartial());
      }

      public com.google.protobuf.Descriptors.Descriptor
          getDescriptorForType() {
        return org.apache.flume.channel.file.proto.ProtosFactory.Put.getDescriptor();
      }

      public org.apache.flume.channel.file.proto.ProtosFactory.Put getDefaultInstanceForType() {
        return org.apache.flume.channel.file.proto.ProtosFactory.Put.getDefaultInstance();
      }

      public org.apache.flume.channel.file.proto.ProtosFactory.Put build() {
        org.apache.flume.channel.file.proto.ProtosFactory.Put result = buildPartial();
        if (!result.isInitialized()) {
          throw newUninitializedMessageException(result);
        }
        return result;
      }

      private org.apache.flume.channel.file.proto.ProtosFactory.Put buildParsed()
          throws com.google.protobuf.InvalidProtocolBufferException {
        org.apache.flume.channel.file.proto.ProtosFactory.Put result = buildPartial();
        if (!result.isInitialized()) {
          throw newUninitializedMessageException(
            result).asInvalidProtocolBufferException();
        }
        return result;
      }

      public org.apache.flume.channel.file.proto.ProtosFactory.Put buildPartial() {
        org.apache.flume.channel.file.proto.ProtosFactory.Put result = new org.apache.flume.channel.file.proto.ProtosFactory.Put(this);
        int from_bitField0_ = bitField0_;
        int to_bitField0_ = 0;
        if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
          to_bitField0_ |= 0x00000001;
        }
        if (eventBuilder_ == null) {
          result.event_ = event_;
        } else {
          result.event_ = eventBuilder_.build();
        }
        result.bitField0_ = to_bitField0_;
        onBuilt();
        return result;
      }

      public Builder mergeFrom(com.google.protobuf.Message other) {
        if (other instanceof org.apache.flume.channel.file.proto.ProtosFactory.Put) {
          return mergeFrom((org.apache.flume.channel.file.proto.ProtosFactory.Put)other);
        } else {
          super.mergeFrom(other);
          return this;
        }
      }

      public Builder mergeFrom(org.apache.flume.channel.file.proto.ProtosFactory.Put other) {
        if (other == org.apache.flume.channel.file.proto.ProtosFactory.Put.getDefaultInstance()) return this;
        if (other.hasEvent()) {
          mergeEvent(other.getEvent());
        }
        this.mergeUnknownFields(other.getUnknownFields());
        return this;
      }

      public final boolean isInitialized() {
        if (!hasEvent()) {

          return false;
        }
        if (!getEvent().isInitialized()) {

          return false;
        }
        return true;
      }

      public Builder mergeFrom(
          com.google.protobuf.CodedInputStream input,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws java.io.IOException {
        com.google.protobuf.UnknownFieldSet.Builder unknownFields =
          com.google.protobuf.UnknownFieldSet.newBuilder(
            this.getUnknownFields());
        while (true) {
          int tag = input.readTag();
          switch (tag) {
            case 0:
              this.setUnknownFields(unknownFields.build());
              onChanged();
              return this;
            default: {
              if (!parseUnknownField(input, unknownFields,
                                     extensionRegistry, tag)) {
                this.setUnknownFields(unknownFields.build());
                onChanged();
                return this;
              }
              break;
            }
            case 10: {
              org.apache.flume.channel.file.proto.ProtosFactory.FlumeEvent.Builder subBuilder = org.apache.flume.channel.file.proto.ProtosFactory.FlumeEvent.newBuilder();
              if (hasEvent()) {
                subBuilder.mergeFrom(getEvent());
              }
              input.readMessage(subBuilder, extensionRegistry);
              setEvent(subBuilder.buildPartial());
              break;
            }
          }
        }
      }

      private int bitField0_;

      // required .FlumeEvent event = 1;
      private org.apache.flume.channel.file.proto.ProtosFactory.FlumeEvent event_ = org.apache.flume.channel.file.proto.ProtosFactory.FlumeEvent.getDefaultInstance();
      private com.google.protobuf.SingleFieldBuilder<
          org.apache.flume.channel.file.proto.ProtosFactory.FlumeEvent, org.apache.flume.channel.file.proto.ProtosFactory.FlumeEvent.Builder, org.apache.flume.channel.file.proto.ProtosFactory.FlumeEventOrBuilder> eventBuilder_;
      public boolean hasEvent() {
        return ((bitField0_ & 0x00000001) == 0x00000001);
      }
      public org.apache.flume.channel.file.proto.ProtosFactory.FlumeEvent getEvent() {
        if (eventBuilder_ == null) {
          return event_;
        } else {
          return eventBuilder_.getMessage();
        }
      }
      public Builder setEvent(org.apache.flume.channel.file.proto.ProtosFactory.FlumeEvent value) {
        if (eventBuilder_ == null) {
          if (value == null) {
            throw new NullPointerException();
          }
          event_ = value;
          onChanged();
        } else {
          eventBuilder_.setMessage(value);
        }
        bitField0_ |= 0x00000001;
        return this;
      }
      public Builder setEvent(
          org.apache.flume.channel.file.proto.ProtosFactory.FlumeEvent.Builder builderForValue) {
        if (eventBuilder_ == null) {
          event_ = builderForValue.build();
          onChanged();
        } else {
          eventBuilder_.setMessage(builderForValue.build());
        }
        bitField0_ |= 0x00000001;
        return this;
      }
      public Builder mergeEvent(org.apache.flume.channel.file.proto.ProtosFactory.FlumeEvent value) {
        if (eventBuilder_ == null) {
          if (((bitField0_ & 0x00000001) == 0x00000001) &&
              event_ != org.apache.flume.channel.file.proto.ProtosFactory.FlumeEvent.getDefaultInstance()) {
            event_ =
              org.apache.flume.channel.file.proto.ProtosFactory.FlumeEvent.newBuilder(event_).mergeFrom(value).buildPartial();
          } else {
            event_ = value;
          }
          onChanged();
        } else {
          eventBuilder_.mergeFrom(value);
        }
        bitField0_ |= 0x00000001;
        return this;
      }
      public Builder clearEvent() {
        if (eventBuilder_ == null) {
          event_ = org.apache.flume.channel.file.proto.ProtosFactory.FlumeEvent.getDefaultInstance();
          onChanged();
        } else {
          eventBuilder_.clear();
        }
        bitField0_ = (bitField0_ & ~0x00000001);
        return this;
      }
      public org.apache.flume.channel.file.proto.ProtosFactory.FlumeEvent.Builder getEventBuilder() {
        bitField0_ |= 0x00000001;
        onChanged();
        return getEventFieldBuilder().getBuilder();
      }
      public org.apache.flume.channel.file.proto.ProtosFactory.FlumeEventOrBuilder getEventOrBuilder() {
        if (eventBuilder_ != null) {
          return eventBuilder_.getMessageOrBuilder();
        } else {
          return event_;
        }
      }
      private com.google.protobuf.SingleFieldBuilder<
          org.apache.flume.channel.file.proto.ProtosFactory.FlumeEvent, org.apache.flume.channel.file.proto.ProtosFactory.FlumeEvent.Builder, org.apache.flume.channel.file.proto.ProtosFactory.FlumeEventOrBuilder>
          getEventFieldBuilder() {
        if (eventBuilder_ == null) {
          eventBuilder_ = new com.google.protobuf.SingleFieldBuilder<
              org.apache.flume.channel.file.proto.ProtosFactory.FlumeEvent, org.apache.flume.channel.file.proto.ProtosFactory.FlumeEvent.Builder, org.apache.flume.channel.file.proto.ProtosFactory.FlumeEventOrBuilder>(
                  event_,
                  getParentForChildren(),
                  isClean());
          event_ = null;
        }
        return eventBuilder_;
      }

      // @@protoc_insertion_point(builder_scope:Put)
    }

    static {
      defaultInstance = new Put(true);
      defaultInstance.initFields();
    }

    // @@protoc_insertion_point(class_scope:Put)
  }

  public interface TakeOrBuilder
      extends com.google.protobuf.MessageOrBuilder {

    // required sfixed32 fileID = 1;
    boolean hasFileID();
    int getFileID();

    // required sfixed32 offset = 2;
    boolean hasOffset();
    int getOffset();
  }
  public static final class Take extends
      com.google.protobuf.GeneratedMessage
      implements TakeOrBuilder {
    // Use Take.newBuilder() to construct.
    private Take(Builder builder) {
      super(builder);
    }
    private Take(boolean noInit) {}

    private static final Take defaultInstance;
    public static Take getDefaultInstance() {
      return defaultInstance;
    }

    public Take getDefaultInstanceForType() {
      return defaultInstance;
    }

    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return org.apache.flume.channel.file.proto.ProtosFactory.internal_static_Take_descriptor;
    }

    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return org.apache.flume.channel.file.proto.ProtosFactory.internal_static_Take_fieldAccessorTable;
    }

    private int bitField0_;
    // required sfixed32 fileID = 1;
    public static final int FILEID_FIELD_NUMBER = 1;
    private int fileID_;
    public boolean hasFileID() {
      return ((bitField0_ & 0x00000001) == 0x00000001);
    }
    public int getFileID() {
      return fileID_;
    }

    // required sfixed32 offset = 2;
    public static final int OFFSET_FIELD_NUMBER = 2;
    private int offset_;
    public boolean hasOffset() {
      return ((bitField0_ & 0x00000002) == 0x00000002);
    }
    public int getOffset() {
      return offset_;
    }

    private void initFields() {
      fileID_ = 0;
      offset_ = 0;
    }
    private byte memoizedIsInitialized = -1;
    public final boolean isInitialized() {
      byte isInitialized = memoizedIsInitialized;
      if (isInitialized != -1) return isInitialized == 1;

      if (!hasFileID()) {
        memoizedIsInitialized = 0;
        return false;
      }
      if (!hasOffset()) {
        memoizedIsInitialized = 0;
        return false;
      }
      memoizedIsInitialized = 1;
      return true;
    }

    public void writeTo(com.google.protobuf.CodedOutputStream output)
                        throws java.io.IOException {
      getSerializedSize();
      if (((bitField0_ & 0x00000001) == 0x00000001)) {
        output.writeSFixed32(1, fileID_);
      }
      if (((bitField0_ & 0x00000002) == 0x00000002)) {
        output.writeSFixed32(2, offset_);
      }
      getUnknownFields().writeTo(output);
    }

    private int memoizedSerializedSize = -1;
    public int getSerializedSize() {
      int size = memoizedSerializedSize;
      if (size != -1) return size;

      size = 0;
      if (((bitField0_ & 0x00000001) == 0x00000001)) {
        size += com.google.protobuf.CodedOutputStream
          .computeSFixed32Size(1, fileID_);
      }
      if (((bitField0_ & 0x00000002) == 0x00000002)) {
        size += com.google.protobuf.CodedOutputStream
          .computeSFixed32Size(2, offset_);
      }
      size += getUnknownFields().getSerializedSize();
      memoizedSerializedSize = size;
      return size;
    }

    private static final long serialVersionUID = 0L;
    @java.lang.Override
    protected java.lang.Object writeReplace()
        throws java.io.ObjectStreamException {
      return super.writeReplace();
    }

    public static org.apache.flume.channel.file.proto.ProtosFactory.Take parseFrom(
        com.google.protobuf.ByteString data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return newBuilder().mergeFrom(data).buildParsed();
    }
    public static org.apache.flume.channel.file.proto.ProtosFactory.Take parseFrom(
        com.google.protobuf.ByteString data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return newBuilder().mergeFrom(data, extensionRegistry)
               .buildParsed();
    }
    public static org.apache.flume.channel.file.proto.ProtosFactory.Take parseFrom(byte[] data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return newBuilder().mergeFrom(data).buildParsed();
    }
    public static org.apache.flume.channel.file.proto.ProtosFactory.Take parseFrom(
        byte[] data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return newBuilder().mergeFrom(data, extensionRegistry)
               .buildParsed();
    }
    public static org.apache.flume.channel.file.proto.ProtosFactory.Take parseFrom(java.io.InputStream input)
        throws java.io.IOException {
      return newBuilder().mergeFrom(input).buildParsed();
    }
    public static org.apache.flume.channel.file.proto.ProtosFactory.Take parseFrom(
        java.io.InputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return newBuilder().mergeFrom(input, extensionRegistry)
               .buildParsed();
    }
    public static org.apache.flume.channel.file.proto.ProtosFactory.Take parseDelimitedFrom(java.io.InputStream input)
        throws java.io.IOException {
      Builder builder = newBuilder();
      if (builder.mergeDelimitedFrom(input)) {
        return builder.buildParsed();
      } else {
        return null;
      }
    }
    public static org.apache.flume.channel.file.proto.ProtosFactory.Take parseDelimitedFrom(
        java.io.InputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      Builder builder = newBuilder();
      if (builder.mergeDelimitedFrom(input, extensionRegistry)) {
        return builder.buildParsed();
      } else {
        return null;
      }
    }
    public static org.apache.flume.channel.file.proto.ProtosFactory.Take parseFrom(
        com.google.protobuf.CodedInputStream input)
        throws java.io.IOException {
      return newBuilder().mergeFrom(input).buildParsed();
    }
    public static org.apache.flume.channel.file.proto.ProtosFactory.Take parseFrom(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return newBuilder().mergeFrom(input, extensionRegistry)
               .buildParsed();
    }

    public static Builder newBuilder() { return Builder.create(); }
    public Builder newBuilderForType() { return newBuilder(); }
    public static Builder newBuilder(org.apache.flume.channel.file.proto.ProtosFactory.Take prototype) {
      return newBuilder().mergeFrom(prototype);
    }
    public Builder toBuilder() { return newBuilder(this); }

    @java.lang.Override
    protected Builder newBuilderForType(
        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
      Builder builder = new Builder(parent);
      return builder;
    }
    public static final class Builder extends
        com.google.protobuf.GeneratedMessage.Builder<Builder>
       implements org.apache.flume.channel.file.proto.ProtosFactory.TakeOrBuilder {
      public static final com.google.protobuf.Descriptors.Descriptor
          getDescriptor() {
        return org.apache.flume.channel.file.proto.ProtosFactory.internal_static_Take_descriptor;
      }

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
          internalGetFieldAccessorTable() {
        return org.apache.flume.channel.file.proto.ProtosFactory.internal_static_Take_fieldAccessorTable;
      }

      // Construct using org.apache.flume.channel.file.proto.ProtosFactory.Take.newBuilder()
      private Builder() {
        maybeForceBuilderInitialization();
      }

      private Builder(BuilderParent parent) {
        super(parent);
        maybeForceBuilderInitialization();
      }
      private void maybeForceBuilderInitialization() {
        if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
        }
      }
      private static Builder create() {
        return new Builder();
      }

      public Builder clear() {
        super.clear();
        fileID_ = 0;
        bitField0_ = (bitField0_ & ~0x00000001);
        offset_ = 0;
        bitField0_ = (bitField0_ & ~0x00000002);
        return this;
      }

      public Builder clone() {
        return create().mergeFrom(buildPartial());
      }

      public com.google.protobuf.Descriptors.Descriptor
          getDescriptorForType() {
        return org.apache.flume.channel.file.proto.ProtosFactory.Take.getDescriptor();
      }

      public org.apache.flume.channel.file.proto.ProtosFactory.Take getDefaultInstanceForType() {
        return org.apache.flume.channel.file.proto.ProtosFactory.Take.getDefaultInstance();
      }

      public org.apache.flume.channel.file.proto.ProtosFactory.Take build() {
        org.apache.flume.channel.file.proto.ProtosFactory.Take result = buildPartial();
        if (!result.isInitialized()) {
          throw newUninitializedMessageException(result);
        }
        return result;
      }

      private org.apache.flume.channel.file.proto.ProtosFactory.Take buildParsed()
          throws com.google.protobuf.InvalidProtocolBufferException {
        org.apache.flume.channel.file.proto.ProtosFactory.Take result = buildPartial();
        if (!result.isInitialized()) {
          throw newUninitializedMessageException(
            result).asInvalidProtocolBufferException();
        }
        return result;
      }

      public org.apache.flume.channel.file.proto.ProtosFactory.Take buildPartial() {
        org.apache.flume.channel.file.proto.ProtosFactory.Take result = new org.apache.flume.channel.file.proto.ProtosFactory.Take(this);
        int from_bitField0_ = bitField0_;
        int to_bitField0_ = 0;
        if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
          to_bitField0_ |= 0x00000001;
        }
        result.fileID_ = fileID_;
        if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
          to_bitField0_ |= 0x00000002;
        }
        result.offset_ = offset_;
        result.bitField0_ = to_bitField0_;
        onBuilt();
        return result;
      }

      public Builder mergeFrom(com.google.protobuf.Message other) {
        if (other instanceof org.apache.flume.channel.file.proto.ProtosFactory.Take) {
          return mergeFrom((org.apache.flume.channel.file.proto.ProtosFactory.Take)other);
        } else {
          super.mergeFrom(other);
          return this;
        }
      }

      public Builder mergeFrom(org.apache.flume.channel.file.proto.ProtosFactory.Take other) {
        if (other == org.apache.flume.channel.file.proto.ProtosFactory.Take.getDefaultInstance()) return this;
        if (other.hasFileID()) {
          setFileID(other.getFileID());
        }
        if (other.hasOffset()) {
          setOffset(other.getOffset());
        }
        this.mergeUnknownFields(other.getUnknownFields());
        return this;
      }

      public final boolean isInitialized() {
        if (!hasFileID()) {

          return false;
        }
        if (!hasOffset()) {

          return false;
        }
        return true;
      }

      public Builder mergeFrom(
          com.google.protobuf.CodedInputStream input,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws java.io.IOException {
        com.google.protobuf.UnknownFieldSet.Builder unknownFields =
          com.google.protobuf.UnknownFieldSet.newBuilder(
            this.getUnknownFields());
        while (true) {
          int tag = input.readTag();
          switch (tag) {
            case 0:
              this.setUnknownFields(unknownFields.build());
              onChanged();
              return this;
            default: {
              if (!parseUnknownField(input, unknownFields,
                                     extensionRegistry, tag)) {
                this.setUnknownFields(unknownFields.build());
                onChanged();
                return this;
              }
              break;
            }
            case 13: {
              bitField0_ |= 0x00000001;
              fileID_ = input.readSFixed32();
              break;
            }
            case 21: {
              bitField0_ |= 0x00000002;
              offset_ = input.readSFixed32();
              break;
            }
          }
        }
      }

      private int bitField0_;

      // required sfixed32 fileID = 1;
      private int fileID_ ;
      public boolean hasFileID() {
        return ((bitField0_ & 0x00000001) == 0x00000001);
      }
      public int getFileID() {
        return fileID_;
      }
      public Builder setFileID(int value) {
        bitField0_ |= 0x00000001;
        fileID_ = value;
        onChanged();
        return this;
      }
      public Builder clearFileID() {
        bitField0_ = (bitField0_ & ~0x00000001);
        fileID_ = 0;
        onChanged();
        return this;
      }

      // required sfixed32 offset = 2;
      private int offset_ ;
      public boolean hasOffset() {
        return ((bitField0_ & 0x00000002) == 0x00000002);
      }
      public int getOffset() {
        return offset_;
      }
      public Builder setOffset(int value) {
        bitField0_ |= 0x00000002;
        offset_ = value;
        onChanged();
        return this;
      }
      public Builder clearOffset() {
        bitField0_ = (bitField0_ & ~0x00000002);
        offset_ = 0;
        onChanged();
        return this;
      }

      // @@protoc_insertion_point(builder_scope:Take)
    }

    static {
      defaultInstance = new Take(true);
      defaultInstance.initFields();
    }

    // @@protoc_insertion_point(class_scope:Take)
  }

  public interface RollbackOrBuilder
      extends com.google.protobuf.MessageOrBuilder {
  }
  public static final class Rollback extends
      com.google.protobuf.GeneratedMessage
      implements RollbackOrBuilder {
    // Use Rollback.newBuilder() to construct.
    private Rollback(Builder builder) {
      super(builder);
    }
    private Rollback(boolean noInit) {}

    private static final Rollback defaultInstance;
    public static Rollback getDefaultInstance() {
      return defaultInstance;
    }

    public Rollback getDefaultInstanceForType() {
      return defaultInstance;
    }

    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return org.apache.flume.channel.file.proto.ProtosFactory.internal_static_Rollback_descriptor;
    }

    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return org.apache.flume.channel.file.proto.ProtosFactory.internal_static_Rollback_fieldAccessorTable;
    }

    private void initFields() {
    }
    private byte memoizedIsInitialized = -1;
    public final boolean isInitialized() {
      byte isInitialized = memoizedIsInitialized;
      if (isInitialized != -1) return isInitialized == 1;

      memoizedIsInitialized = 1;
      return true;
    }

    public void writeTo(com.google.protobuf.CodedOutputStream output)
                        throws java.io.IOException {
      getSerializedSize();
      getUnknownFields().writeTo(output);
    }

    private int memoizedSerializedSize = -1;
    public int getSerializedSize() {
      int size = memoizedSerializedSize;
      if (size != -1) return size;

      size = 0;
      size += getUnknownFields().getSerializedSize();
      memoizedSerializedSize = size;
      return size;
    }

    private static final long serialVersionUID = 0L;
    @java.lang.Override
    protected java.lang.Object writeReplace()
        throws java.io.ObjectStreamException {
      return super.writeReplace();
    }

    public static org.apache.flume.channel.file.proto.ProtosFactory.Rollback parseFrom(
        com.google.protobuf.ByteString data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return newBuilder().mergeFrom(data).buildParsed();
    }
    public static org.apache.flume.channel.file.proto.ProtosFactory.Rollback parseFrom(
        com.google.protobuf.ByteString data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return newBuilder().mergeFrom(data, extensionRegistry)
               .buildParsed();
    }
    public static org.apache.flume.channel.file.proto.ProtosFactory.Rollback parseFrom(byte[] data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return newBuilder().mergeFrom(data).buildParsed();
    }
    public static org.apache.flume.channel.file.proto.ProtosFactory.Rollback parseFrom(
        byte[] data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return newBuilder().mergeFrom(data, extensionRegistry)
               .buildParsed();
    }
    public static org.apache.flume.channel.file.proto.ProtosFactory.Rollback parseFrom(java.io.InputStream input)
        throws java.io.IOException {
      return newBuilder().mergeFrom(input).buildParsed();
    }
    public static org.apache.flume.channel.file.proto.ProtosFactory.Rollback parseFrom(
        java.io.InputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return newBuilder().mergeFrom(input, extensionRegistry)
               .buildParsed();
    }
    public static org.apache.flume.channel.file.proto.ProtosFactory.Rollback parseDelimitedFrom(java.io.InputStream input)
        throws java.io.IOException {
      Builder builder = newBuilder();
      if (builder.mergeDelimitedFrom(input)) {
        return builder.buildParsed();
      } else {
        return null;
      }
    }
    public static org.apache.flume.channel.file.proto.ProtosFactory.Rollback parseDelimitedFrom(
        java.io.InputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      Builder builder = newBuilder();
      if (builder.mergeDelimitedFrom(input, extensionRegistry)) {
        return builder.buildParsed();
      } else {
        return null;
      }
    }
    public static org.apache.flume.channel.file.proto.ProtosFactory.Rollback parseFrom(
        com.google.protobuf.CodedInputStream input)
        throws java.io.IOException {
      return newBuilder().mergeFrom(input).buildParsed();
    }
    public static org.apache.flume.channel.file.proto.ProtosFactory.Rollback parseFrom(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return newBuilder().mergeFrom(input, extensionRegistry)
               .buildParsed();
    }

    public static Builder newBuilder() { return Builder.create(); }
    public Builder newBuilderForType() { return newBuilder(); }
    public static Builder newBuilder(org.apache.flume.channel.file.proto.ProtosFactory.Rollback prototype) {
      return newBuilder().mergeFrom(prototype);
    }
    public Builder toBuilder() { return newBuilder(this); }

    @java.lang.Override
    protected Builder newBuilderForType(
        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
      Builder builder = new Builder(parent);
      return builder;
    }
    public static final class Builder extends
        com.google.protobuf.GeneratedMessage.Builder<Builder>
       implements org.apache.flume.channel.file.proto.ProtosFactory.RollbackOrBuilder {
      public static final com.google.protobuf.Descriptors.Descriptor
          getDescriptor() {
        return org.apache.flume.channel.file.proto.ProtosFactory.internal_static_Rollback_descriptor;
      }

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
          internalGetFieldAccessorTable() {
        return org.apache.flume.channel.file.proto.ProtosFactory.internal_static_Rollback_fieldAccessorTable;
      }

      // Construct using org.apache.flume.channel.file.proto.ProtosFactory.Rollback.newBuilder()
      private Builder() {
        maybeForceBuilderInitialization();
      }

      private Builder(BuilderParent parent) {
        super(parent);
        maybeForceBuilderInitialization();
      }
      private void maybeForceBuilderInitialization() {
        if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
        }
      }
      private static Builder create() {
        return new Builder();
      }

      public Builder clear() {
        super.clear();
        return this;
      }

      public Builder clone() {
        return create().mergeFrom(buildPartial());
      }

      public com.google.protobuf.Descriptors.Descriptor
          getDescriptorForType() {
        return org.apache.flume.channel.file.proto.ProtosFactory.Rollback.getDescriptor();
      }

      public org.apache.flume.channel.file.proto.ProtosFactory.Rollback getDefaultInstanceForType() {
        return org.apache.flume.channel.file.proto.ProtosFactory.Rollback.getDefaultInstance();
      }

      public org.apache.flume.channel.file.proto.ProtosFactory.Rollback build() {
        org.apache.flume.channel.file.proto.ProtosFactory.Rollback result = buildPartial();
        if (!result.isInitialized()) {
          throw newUninitializedMessageException(result);
        }
        return result;
      }

      private org.apache.flume.channel.file.proto.ProtosFactory.Rollback buildParsed()
          throws com.google.protobuf.InvalidProtocolBufferException {
        org.apache.flume.channel.file.proto.ProtosFactory.Rollback result = buildPartial();
        if (!result.isInitialized()) {
          throw newUninitializedMessageException(
            result).asInvalidProtocolBufferException();
        }
        return result;
      }

      public org.apache.flume.channel.file.proto.ProtosFactory.Rollback buildPartial() {
        org.apache.flume.channel.file.proto.ProtosFactory.Rollback result = new org.apache.flume.channel.file.proto.ProtosFactory.Rollback(this);
        onBuilt();
        return result;
      }

      public Builder mergeFrom(com.google.protobuf.Message other) {
        if (other instanceof org.apache.flume.channel.file.proto.ProtosFactory.Rollback) {
          return mergeFrom((org.apache.flume.channel.file.proto.ProtosFactory.Rollback)other);
        } else {
          super.mergeFrom(other);
          return this;
        }
      }

      public Builder mergeFrom(org.apache.flume.channel.file.proto.ProtosFactory.Rollback other) {
        if (other == org.apache.flume.channel.file.proto.ProtosFactory.Rollback.getDefaultInstance()) return this;
        this.mergeUnknownFields(other.getUnknownFields());
        return this;
      }

      public final boolean isInitialized() {
        return true;
      }

      public Builder mergeFrom(
          com.google.protobuf.CodedInputStream input,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws java.io.IOException {
        com.google.protobuf.UnknownFieldSet.Builder unknownFields =
          com.google.protobuf.UnknownFieldSet.newBuilder(
            this.getUnknownFields());
        while (true) {
          int tag = input.readTag();
          switch (tag) {
            case 0:
              this.setUnknownFields(unknownFields.build());
              onChanged();
              return this;
            default: {
              if (!parseUnknownField(input, unknownFields,
                                     extensionRegistry, tag)) {
                this.setUnknownFields(unknownFields.build());
                onChanged();
                return this;
              }
              break;
            }
          }
        }
      }


      // @@protoc_insertion_point(builder_scope:Rollback)
    }

    static {
      defaultInstance = new Rollback(true);
      defaultInstance.initFields();
    }

    // @@protoc_insertion_point(class_scope:Rollback)
  }

  public interface CommitOrBuilder
      extends com.google.protobuf.MessageOrBuilder {

    // required sfixed32 type = 1;
    boolean hasType();
    int getType();
  }
  public static final class Commit extends
      com.google.protobuf.GeneratedMessage
      implements CommitOrBuilder {
    // Use Commit.newBuilder() to construct.
    private Commit(Builder builder) {
      super(builder);
    }
    private Commit(boolean noInit) {}

    private static final Commit defaultInstance;
    public static Commit getDefaultInstance() {
      return defaultInstance;
    }

    public Commit getDefaultInstanceForType() {
      return defaultInstance;
    }

    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return org.apache.flume.channel.file.proto.ProtosFactory.internal_static_Commit_descriptor;
    }

    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return org.apache.flume.channel.file.proto.ProtosFactory.internal_static_Commit_fieldAccessorTable;
    }

    private int bitField0_;
    // required sfixed32 type = 1;
    public static final int TYPE_FIELD_NUMBER = 1;
    private int type_;
    public boolean hasType() {
      return ((bitField0_ & 0x00000001) == 0x00000001);
    }
    public int getType() {
      return type_;
    }

    private void initFields() {
      type_ = 0;
    }
    private byte memoizedIsInitialized = -1;
    public final boolean isInitialized() {
      byte isInitialized = memoizedIsInitialized;
      if (isInitialized != -1) return isInitialized == 1;

      if (!hasType()) {
        memoizedIsInitialized = 0;
        return false;
      }
      memoizedIsInitialized = 1;
      return true;
    }

    public void writeTo(com.google.protobuf.CodedOutputStream output)
                        throws java.io.IOException {
      getSerializedSize();
      if (((bitField0_ & 0x00000001) == 0x00000001)) {
        output.writeSFixed32(1, type_);
      }
      getUnknownFields().writeTo(output);
    }

    private int memoizedSerializedSize = -1;
    public int getSerializedSize() {
      int size = memoizedSerializedSize;
      if (size != -1) return size;

      size = 0;
      if (((bitField0_ & 0x00000001) == 0x00000001)) {
        size += com.google.protobuf.CodedOutputStream
          .computeSFixed32Size(1, type_);
      }
      size += getUnknownFields().getSerializedSize();
      memoizedSerializedSize = size;
      return size;
    }

    private static final long serialVersionUID = 0L;
    @java.lang.Override
    protected java.lang.Object writeReplace()
        throws java.io.ObjectStreamException {
      return super.writeReplace();
    }

    public static org.apache.flume.channel.file.proto.ProtosFactory.Commit parseFrom(
        com.google.protobuf.ByteString data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return newBuilder().mergeFrom(data).buildParsed();
    }
    public static org.apache.flume.channel.file.proto.ProtosFactory.Commit parseFrom(
        com.google.protobuf.ByteString data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return newBuilder().mergeFrom(data, extensionRegistry)
               .buildParsed();
    }
    public static org.apache.flume.channel.file.proto.ProtosFactory.Commit parseFrom(byte[] data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return newBuilder().mergeFrom(data).buildParsed();
    }
    public static org.apache.flume.channel.file.proto.ProtosFactory.Commit parseFrom(
        byte[] data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return newBuilder().mergeFrom(data, extensionRegistry)
               .buildParsed();
    }
    public static org.apache.flume.channel.file.proto.ProtosFactory.Commit parseFrom(java.io.InputStream input)
        throws java.io.IOException {
      return newBuilder().mergeFrom(input).buildParsed();
    }
    public static org.apache.flume.channel.file.proto.ProtosFactory.Commit parseFrom(
        java.io.InputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return newBuilder().mergeFrom(input, extensionRegistry)
               .buildParsed();
    }
    public static org.apache.flume.channel.file.proto.ProtosFactory.Commit parseDelimitedFrom(java.io.InputStream input)
        throws java.io.IOException {
      Builder builder = newBuilder();
      if (builder.mergeDelimitedFrom(input)) {
        return builder.buildParsed();
      } else {
        return null;
      }
    }
    public static org.apache.flume.channel.file.proto.ProtosFactory.Commit parseDelimitedFrom(
        java.io.InputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      Builder builder = newBuilder();
      if (builder.mergeDelimitedFrom(input, extensionRegistry)) {
        return builder.buildParsed();
      } else {
        return null;
      }
    }
    public static org.apache.flume.channel.file.proto.ProtosFactory.Commit parseFrom(
        com.google.protobuf.CodedInputStream input)
        throws java.io.IOException {
      return newBuilder().mergeFrom(input).buildParsed();
    }
    public static org.apache.flume.channel.file.proto.ProtosFactory.Commit parseFrom(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return newBuilder().mergeFrom(input, extensionRegistry)
               .buildParsed();
    }

    public static Builder newBuilder() { return Builder.create(); }
    public Builder newBuilderForType() { return newBuilder(); }
    public static Builder newBuilder(org.apache.flume.channel.file.proto.ProtosFactory.Commit prototype) {
      return newBuilder().mergeFrom(prototype);
    }
    public Builder toBuilder() { return newBuilder(this); }

    @java.lang.Override
    protected Builder newBuilderForType(
        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
      Builder builder = new Builder(parent);
      return builder;
    }
    public static final class Builder extends
        com.google.protobuf.GeneratedMessage.Builder<Builder>
       implements org.apache.flume.channel.file.proto.ProtosFactory.CommitOrBuilder {
      public static final com.google.protobuf.Descriptors.Descriptor
          getDescriptor() {
        return org.apache.flume.channel.file.proto.ProtosFactory.internal_static_Commit_descriptor;
      }

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
          internalGetFieldAccessorTable() {
        return org.apache.flume.channel.file.proto.ProtosFactory.internal_static_Commit_fieldAccessorTable;
      }

      // Construct using org.apache.flume.channel.file.proto.ProtosFactory.Commit.newBuilder()
      private Builder() {
        maybeForceBuilderInitialization();
      }

      private Builder(BuilderParent parent) {
        super(parent);
        maybeForceBuilderInitialization();
      }
      private void maybeForceBuilderInitialization() {
        if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
        }
      }
      private static Builder create() {
        return new Builder();
      }

      public Builder clear() {
        super.clear();
        type_ = 0;
        bitField0_ = (bitField0_ & ~0x00000001);
        return this;
      }

      public Builder clone() {
        return create().mergeFrom(buildPartial());
      }

      public com.google.protobuf.Descriptors.Descriptor
          getDescriptorForType() {
        return org.apache.flume.channel.file.proto.ProtosFactory.Commit.getDescriptor();
      }

      public org.apache.flume.channel.file.proto.ProtosFactory.Commit getDefaultInstanceForType() {
        return org.apache.flume.channel.file.proto.ProtosFactory.Commit.getDefaultInstance();
      }

      public org.apache.flume.channel.file.proto.ProtosFactory.Commit build() {
        org.apache.flume.channel.file.proto.ProtosFactory.Commit result = buildPartial();
        if (!result.isInitialized()) {
          throw newUninitializedMessageException(result);
        }
        return result;
      }

      private org.apache.flume.channel.file.proto.ProtosFactory.Commit buildParsed()
          throws com.google.protobuf.InvalidProtocolBufferException {
        org.apache.flume.channel.file.proto.ProtosFactory.Commit result = buildPartial();
        if (!result.isInitialized()) {
          throw newUninitializedMessageException(
            result).asInvalidProtocolBufferException();
        }
        return result;
      }

      public org.apache.flume.channel.file.proto.ProtosFactory.Commit buildPartial() {
        org.apache.flume.channel.file.proto.ProtosFactory.Commit result = new org.apache.flume.channel.file.proto.ProtosFactory.Commit(this);
        int from_bitField0_ = bitField0_;
        int to_bitField0_ = 0;
        if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
          to_bitField0_ |= 0x00000001;
        }
        result.type_ = type_;
        result.bitField0_ = to_bitField0_;
        onBuilt();
        return result;
      }

      public Builder mergeFrom(com.google.protobuf.Message other) {
        if (other instanceof org.apache.flume.channel.file.proto.ProtosFactory.Commit) {
          return mergeFrom((org.apache.flume.channel.file.proto.ProtosFactory.Commit)other);
        } else {
          super.mergeFrom(other);
          return this;
        }
      }

      public Builder mergeFrom(org.apache.flume.channel.file.proto.ProtosFactory.Commit other) {
        if (other == org.apache.flume.channel.file.proto.ProtosFactory.Commit.getDefaultInstance()) return this;
        if (other.hasType()) {
          setType(other.getType());
        }
        this.mergeUnknownFields(other.getUnknownFields());
        return this;
      }

      public final boolean isInitialized() {
        if (!hasType()) {

          return false;
        }
        return true;
      }

      public Builder mergeFrom(
          com.google.protobuf.CodedInputStream input,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws java.io.IOException {
        com.google.protobuf.UnknownFieldSet.Builder unknownFields =
          com.google.protobuf.UnknownFieldSet.newBuilder(
            this.getUnknownFields());
        while (true) {
          int tag = input.readTag();
          switch (tag) {
            case 0:
              this.setUnknownFields(unknownFields.build());
              onChanged();
              return this;
            default: {
              if (!parseUnknownField(input, unknownFields,
                                     extensionRegistry, tag)) {
                this.setUnknownFields(unknownFields.build());
                onChanged();
                return this;
              }
              break;
            }
            case 13: {
              bitField0_ |= 0x00000001;
              type_ = input.readSFixed32();
              break;
            }
          }
        }
      }

      private int bitField0_;

      // required sfixed32 type = 1;
      private int type_ ;
      public boolean hasType() {
        return ((bitField0_ & 0x00000001) == 0x00000001);
      }
      public int getType() {
        return type_;
      }
      public Builder setType(int value) {
        bitField0_ |= 0x00000001;
        type_ = value;
        onChanged();
        return this;
      }
      public Builder clearType() {
        bitField0_ = (bitField0_ & ~0x00000001);
        type_ = 0;
        onChanged();
        return this;
      }

      // @@protoc_insertion_point(builder_scope:Commit)
    }

    static {
      defaultInstance = new Commit(true);
      defaultInstance.initFields();
    }

    // @@protoc_insertion_point(class_scope:Commit)
  }

  public interface TransactionEventFooterOrBuilder
      extends com.google.protobuf.MessageOrBuilder {
  }
  public static final class TransactionEventFooter extends
      com.google.protobuf.GeneratedMessage
      implements TransactionEventFooterOrBuilder {
    // Use TransactionEventFooter.newBuilder() to construct.
    private TransactionEventFooter(Builder builder) {
      super(builder);
    }
    private TransactionEventFooter(boolean noInit) {}

    private static final TransactionEventFooter defaultInstance;
    public static TransactionEventFooter getDefaultInstance() {
      return defaultInstance;
    }

    public TransactionEventFooter getDefaultInstanceForType() {
      return defaultInstance;
    }

    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return org.apache.flume.channel.file.proto.ProtosFactory.internal_static_TransactionEventFooter_descriptor;
    }

    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return org.apache.flume.channel.file.proto.ProtosFactory.internal_static_TransactionEventFooter_fieldAccessorTable;
    }

    private void initFields() {
    }
    private byte memoizedIsInitialized = -1;
    public final boolean isInitialized() {
      byte isInitialized = memoizedIsInitialized;
      if (isInitialized != -1) return isInitialized == 1;

      memoizedIsInitialized = 1;
      return true;
    }

    public void writeTo(com.google.protobuf.CodedOutputStream output)
                        throws java.io.IOException {
      getSerializedSize();
      getUnknownFields().writeTo(output);
    }

    private int memoizedSerializedSize = -1;
    public int getSerializedSize() {
      int size = memoizedSerializedSize;
      if (size != -1) return size;

      size = 0;
      size += getUnknownFields().getSerializedSize();
      memoizedSerializedSize = size;
      return size;
    }

    private static final long serialVersionUID = 0L;
    @java.lang.Override
    protected java.lang.Object writeReplace()
        throws java.io.ObjectStreamException {
      return super.writeReplace();
    }

    public static org.apache.flume.channel.file.proto.ProtosFactory.TransactionEventFooter parseFrom(
        com.google.protobuf.ByteString data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return newBuilder().mergeFrom(data).buildParsed();
    }
    public static org.apache.flume.channel.file.proto.ProtosFactory.TransactionEventFooter parseFrom(
        com.google.protobuf.ByteString data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return newBuilder().mergeFrom(data, extensionRegistry)
               .buildParsed();
    }
    public static org.apache.flume.channel.file.proto.ProtosFactory.TransactionEventFooter parseFrom(byte[] data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return newBuilder().mergeFrom(data).buildParsed();
    }
    public static org.apache.flume.channel.file.proto.ProtosFactory.TransactionEventFooter parseFrom(
        byte[] data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return newBuilder().mergeFrom(data, extensionRegistry)
               .buildParsed();
    }
    public static org.apache.flume.channel.file.proto.ProtosFactory.TransactionEventFooter parseFrom(java.io.InputStream input)
        throws java.io.IOException {
      return newBuilder().mergeFrom(input).buildParsed();
    }
    public static org.apache.flume.channel.file.proto.ProtosFactory.TransactionEventFooter parseFrom(
        java.io.InputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return newBuilder().mergeFrom(input, extensionRegistry)
               .buildParsed();
    }
    public static org.apache.flume.channel.file.proto.ProtosFactory.TransactionEventFooter parseDelimitedFrom(java.io.InputStream input)
        throws java.io.IOException {
      Builder builder = newBuilder();
      if (builder.mergeDelimitedFrom(input)) {
        return builder.buildParsed();
      } else {
        return null;
      }
    }
    public static org.apache.flume.channel.file.proto.ProtosFactory.TransactionEventFooter parseDelimitedFrom(
        java.io.InputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      Builder builder = newBuilder();
      if (builder.mergeDelimitedFrom(input, extensionRegistry)) {
        return builder.buildParsed();
      } else {
        return null;
      }
    }
    public static org.apache.flume.channel.file.proto.ProtosFactory.TransactionEventFooter parseFrom(
        com.google.protobuf.CodedInputStream input)
        throws java.io.IOException {
      return newBuilder().mergeFrom(input).buildParsed();
    }
    public static org.apache.flume.channel.file.proto.ProtosFactory.TransactionEventFooter parseFrom(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return newBuilder().mergeFrom(input, extensionRegistry)
               .buildParsed();
    }

    public static Builder newBuilder() { return Builder.create(); }
    public Builder newBuilderForType() { return newBuilder(); }
    public static Builder newBuilder(org.apache.flume.channel.file.proto.ProtosFactory.TransactionEventFooter prototype) {
      return newBuilder().mergeFrom(prototype);
    }
    public Builder toBuilder() { return newBuilder(this); }

    @java.lang.Override
    protected Builder newBuilderForType(
        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
      Builder builder = new Builder(parent);
      return builder;
    }
    public static final class Builder extends
        com.google.protobuf.GeneratedMessage.Builder<Builder>
       implements org.apache.flume.channel.file.proto.ProtosFactory.TransactionEventFooterOrBuilder {
      public static final com.google.protobuf.Descriptors.Descriptor
          getDescriptor() {
        return org.apache.flume.channel.file.proto.ProtosFactory.internal_static_TransactionEventFooter_descriptor;
      }

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
          internalGetFieldAccessorTable() {
        return org.apache.flume.channel.file.proto.ProtosFactory.internal_static_TransactionEventFooter_fieldAccessorTable;
      }

      // Construct using org.apache.flume.channel.file.proto.ProtosFactory.TransactionEventFooter.newBuilder()
      private Builder() {
        maybeForceBuilderInitialization();
      }

      private Builder(BuilderParent parent) {
        super(parent);
        maybeForceBuilderInitialization();
      }
      private void maybeForceBuilderInitialization() {
        if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
        }
      }
      private static Builder create() {
        return new Builder();
      }

      public Builder clear() {
        super.clear();
        return this;
      }

      public Builder clone() {
        return create().mergeFrom(buildPartial());
      }

      public com.google.protobuf.Descriptors.Descriptor
          getDescriptorForType() {
        return org.apache.flume.channel.file.proto.ProtosFactory.TransactionEventFooter.getDescriptor();
      }

      public org.apache.flume.channel.file.proto.ProtosFactory.TransactionEventFooter getDefaultInstanceForType() {
        return org.apache.flume.channel.file.proto.ProtosFactory.TransactionEventFooter.getDefaultInstance();
      }

      public org.apache.flume.channel.file.proto.ProtosFactory.TransactionEventFooter build() {
        org.apache.flume.channel.file.proto.ProtosFactory.TransactionEventFooter result = buildPartial();
        if (!result.isInitialized()) {
          throw newUninitializedMessageException(result);
        }
        return result;
      }

      private org.apache.flume.channel.file.proto.ProtosFactory.TransactionEventFooter buildParsed()
          throws com.google.protobuf.InvalidProtocolBufferException {
        org.apache.flume.channel.file.proto.ProtosFactory.TransactionEventFooter result = buildPartial();
        if (!result.isInitialized()) {
          throw newUninitializedMessageException(
            result).asInvalidProtocolBufferException();
        }
        return result;
      }

      public org.apache.flume.channel.file.proto.ProtosFactory.TransactionEventFooter buildPartial() {
        org.apache.flume.channel.file.proto.ProtosFactory.TransactionEventFooter result = new org.apache.flume.channel.file.proto.ProtosFactory.TransactionEventFooter(this);
        onBuilt();
        return result;
      }

      public Builder mergeFrom(com.google.protobuf.Message other) {
        if (other instanceof org.apache.flume.channel.file.proto.ProtosFactory.TransactionEventFooter) {
          return mergeFrom((org.apache.flume.channel.file.proto.ProtosFactory.TransactionEventFooter)other);
        } else {
          super.mergeFrom(other);
          return this;
        }
      }

      public Builder mergeFrom(org.apache.flume.channel.file.proto.ProtosFactory.TransactionEventFooter other) {
        if (other == org.apache.flume.channel.file.proto.ProtosFactory.TransactionEventFooter.getDefaultInstance()) return this;
        this.mergeUnknownFields(other.getUnknownFields());
        return this;
      }

      public final boolean isInitialized() {
        return true;
      }

      public Builder mergeFrom(
          com.google.protobuf.CodedInputStream input,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws java.io.IOException {
        com.google.protobuf.UnknownFieldSet.Builder unknownFields =
          com.google.protobuf.UnknownFieldSet.newBuilder(
            this.getUnknownFields());
        while (true) {
          int tag = input.readTag();
          switch (tag) {
            case 0:
              this.setUnknownFields(unknownFields.build());
              onChanged();
              return this;
            default: {
              if (!parseUnknownField(input, unknownFields,
                                     extensionRegistry, tag)) {
                this.setUnknownFields(unknownFields.build());
                onChanged();
                return this;
              }
              break;
            }
          }
        }
      }


      // @@protoc_insertion_point(builder_scope:TransactionEventFooter)
    }

    static {
      defaultInstance = new TransactionEventFooter(true);
      defaultInstance.initFields();
    }

    // @@protoc_insertion_point(class_scope:TransactionEventFooter)
  }

  public interface FlumeEventOrBuilder
      extends com.google.protobuf.MessageOrBuilder {

    // repeated .FlumeEventHeader headers = 1;
    java.util.List<org.apache.flume.channel.file.proto.ProtosFactory.FlumeEventHeader>
        getHeadersList();
    org.apache.flume.channel.file.proto.ProtosFactory.FlumeEventHeader getHeaders(int index);
    int getHeadersCount();
    java.util.List<? extends org.apache.flume.channel.file.proto.ProtosFactory.FlumeEventHeaderOrBuilder>
        getHeadersOrBuilderList();
    org.apache.flume.channel.file.proto.ProtosFactory.FlumeEventHeaderOrBuilder getHeadersOrBuilder(
        int index);

    // required bytes body = 2;
    boolean hasBody();
    com.google.protobuf.ByteString getBody();
  }
  public static final class FlumeEvent extends
      com.google.protobuf.GeneratedMessage
      implements FlumeEventOrBuilder {
    // Use FlumeEvent.newBuilder() to construct.
    private FlumeEvent(Builder builder) {
      super(builder);
    }
    private FlumeEvent(boolean noInit) {}

    private static final FlumeEvent defaultInstance;
    public static FlumeEvent getDefaultInstance() {
      return defaultInstance;
    }

    public FlumeEvent getDefaultInstanceForType() {
      return defaultInstance;
    }

    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return org.apache.flume.channel.file.proto.ProtosFactory.internal_static_FlumeEvent_descriptor;
    }

    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return org.apache.flume.channel.file.proto.ProtosFactory.internal_static_FlumeEvent_fieldAccessorTable;
    }

    private int bitField0_;
    // repeated .FlumeEventHeader headers = 1;
    public static final int HEADERS_FIELD_NUMBER = 1;
    private java.util.List<org.apache.flume.channel.file.proto.ProtosFactory.FlumeEventHeader> headers_;
    public java.util.List<org.apache.flume.channel.file.proto.ProtosFactory.FlumeEventHeader> getHeadersList() {
      return headers_;
    }
    public java.util.List<? extends org.apache.flume.channel.file.proto.ProtosFactory.FlumeEventHeaderOrBuilder>
        getHeadersOrBuilderList() {
      return headers_;
    }
    public int getHeadersCount() {
      return headers_.size();
    }
    public org.apache.flume.channel.file.proto.ProtosFactory.FlumeEventHeader getHeaders(int index) {
      return headers_.get(index);
    }
    public org.apache.flume.channel.file.proto.ProtosFactory.FlumeEventHeaderOrBuilder getHeadersOrBuilder(
        int index) {
      return headers_.get(index);
    }

    // required bytes body = 2;
    public static final int BODY_FIELD_NUMBER = 2;
    private com.google.protobuf.ByteString body_;
    public boolean hasBody() {
      return ((bitField0_ & 0x00000001) == 0x00000001);
    }
    public com.google.protobuf.ByteString getBody() {
      return body_;
    }

    private void initFields() {
      headers_ = java.util.Collections.emptyList();
      body_ = com.google.protobuf.ByteString.EMPTY;
    }
    private byte memoizedIsInitialized = -1;
    public final boolean isInitialized() {
      byte isInitialized = memoizedIsInitialized;
      if (isInitialized != -1) return isInitialized == 1;

      if (!hasBody()) {
        memoizedIsInitialized = 0;
        return false;
      }
      for (int i = 0; i < getHeadersCount(); i++) {
        if (!getHeaders(i).isInitialized()) {
          memoizedIsInitialized = 0;
          return false;
        }
      }
      memoizedIsInitialized = 1;
      return true;
    }

    public void writeTo(com.google.protobuf.CodedOutputStream output)
                        throws java.io.IOException {
      getSerializedSize();
      for (int i = 0; i < headers_.size(); i++) {
        output.writeMessage(1, headers_.get(i));
      }
      if (((bitField0_ & 0x00000001) == 0x00000001)) {
        output.writeBytes(2, body_);
      }
      getUnknownFields().writeTo(output);
    }

    private int memoizedSerializedSize = -1;
    public int getSerializedSize() {
      int size = memoizedSerializedSize;
      if (size != -1) return size;

      size = 0;
      for (int i = 0; i < headers_.size(); i++) {
        size += com.google.protobuf.CodedOutputStream
          .computeMessageSize(1, headers_.get(i));
      }
      if (((bitField0_ & 0x00000001) == 0x00000001)) {
        size += com.google.protobuf.CodedOutputStream
          .computeBytesSize(2, body_);
      }
      size += getUnknownFields().getSerializedSize();
      memoizedSerializedSize = size;
      return size;
    }

    private static final long serialVersionUID = 0L;
    @java.lang.Override
    protected java.lang.Object writeReplace()
        throws java.io.ObjectStreamException {
      return super.writeReplace();
    }

    public static org.apache.flume.channel.file.proto.ProtosFactory.FlumeEvent parseFrom(
        com.google.protobuf.ByteString data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return newBuilder().mergeFrom(data).buildParsed();
    }
    public static org.apache.flume.channel.file.proto.ProtosFactory.FlumeEvent parseFrom(
        com.google.protobuf.ByteString data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return newBuilder().mergeFrom(data, extensionRegistry)
               .buildParsed();
    }
    public static org.apache.flume.channel.file.proto.ProtosFactory.FlumeEvent parseFrom(byte[] data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return newBuilder().mergeFrom(data).buildParsed();
    }
    public static org.apache.flume.channel.file.proto.ProtosFactory.FlumeEvent parseFrom(
        byte[] data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return newBuilder().mergeFrom(data, extensionRegistry)
               .buildParsed();
    }
    public static org.apache.flume.channel.file.proto.ProtosFactory.FlumeEvent parseFrom(java.io.InputStream input)
        throws java.io.IOException {
      return newBuilder().mergeFrom(input).buildParsed();
    }
    public static org.apache.flume.channel.file.proto.ProtosFactory.FlumeEvent parseFrom(
        java.io.InputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return newBuilder().mergeFrom(input, extensionRegistry)
               .buildParsed();
    }
    public static org.apache.flume.channel.file.proto.ProtosFactory.FlumeEvent parseDelimitedFrom(java.io.InputStream input)
        throws java.io.IOException {
      Builder builder = newBuilder();
      if (builder.mergeDelimitedFrom(input)) {
        return builder.buildParsed();
      } else {
        return null;
      }
    }
    public static org.apache.flume.channel.file.proto.ProtosFactory.FlumeEvent parseDelimitedFrom(
        java.io.InputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      Builder builder = newBuilder();
      if (builder.mergeDelimitedFrom(input, extensionRegistry)) {
        return builder.buildParsed();
      } else {
        return null;
      }
    }
    public static org.apache.flume.channel.file.proto.ProtosFactory.FlumeEvent parseFrom(
        com.google.protobuf.CodedInputStream input)
        throws java.io.IOException {
      return newBuilder().mergeFrom(input).buildParsed();
    }
    public static org.apache.flume.channel.file.proto.ProtosFactory.FlumeEvent parseFrom(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return newBuilder().mergeFrom(input, extensionRegistry)
               .buildParsed();
    }

    public static Builder newBuilder() { return Builder.create(); }
    public Builder newBuilderForType() { return newBuilder(); }
    public static Builder newBuilder(org.apache.flume.channel.file.proto.ProtosFactory.FlumeEvent prototype) {
      return newBuilder().mergeFrom(prototype);
    }
    public Builder toBuilder() { return newBuilder(this); }

    @java.lang.Override
    protected Builder newBuilderForType(
        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
      Builder builder = new Builder(parent);
      return builder;
    }
    public static final class Builder extends
        com.google.protobuf.GeneratedMessage.Builder<Builder>
       implements org.apache.flume.channel.file.proto.ProtosFactory.FlumeEventOrBuilder {
      public static final com.google.protobuf.Descriptors.Descriptor
          getDescriptor() {
        return org.apache.flume.channel.file.proto.ProtosFactory.internal_static_FlumeEvent_descriptor;
      }

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
          internalGetFieldAccessorTable() {
        return org.apache.flume.channel.file.proto.ProtosFactory.internal_static_FlumeEvent_fieldAccessorTable;
      }

      // Construct using org.apache.flume.channel.file.proto.ProtosFactory.FlumeEvent.newBuilder()
      private Builder() {
        maybeForceBuilderInitialization();
      }

      private Builder(BuilderParent parent) {
        super(parent);
        maybeForceBuilderInitialization();
      }
      private void maybeForceBuilderInitialization() {
        if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
          getHeadersFieldBuilder();
        }
      }
      private static Builder create() {
        return new Builder();
      }

      public Builder clear() {
        super.clear();
        if (headersBuilder_ == null) {
          headers_ = java.util.Collections.emptyList();
          bitField0_ = (bitField0_ & ~0x00000001);
        } else {
          headersBuilder_.clear();
        }
        body_ = com.google.protobuf.ByteString.EMPTY;
        bitField0_ = (bitField0_ & ~0x00000002);
        return this;
      }

      public Builder clone() {
        return create().mergeFrom(buildPartial());
      }

      public com.google.protobuf.Descriptors.Descriptor
          getDescriptorForType() {
        return org.apache.flume.channel.file.proto.ProtosFactory.FlumeEvent.getDescriptor();
      }

      public org.apache.flume.channel.file.proto.ProtosFactory.FlumeEvent getDefaultInstanceForType() {
        return org.apache.flume.channel.file.proto.ProtosFactory.FlumeEvent.getDefaultInstance();
      }

      public org.apache.flume.channel.file.proto.ProtosFactory.FlumeEvent build() {
        org.apache.flume.channel.file.proto.ProtosFactory.FlumeEvent result = buildPartial();
        if (!result.isInitialized()) {
          throw newUninitializedMessageException(result);
        }
        return result;
      }

      private org.apache.flume.channel.file.proto.ProtosFactory.FlumeEvent buildParsed()
          throws com.google.protobuf.InvalidProtocolBufferException {
        org.apache.flume.channel.file.proto.ProtosFactory.FlumeEvent result = buildPartial();
        if (!result.isInitialized()) {
          throw newUninitializedMessageException(
            result).asInvalidProtocolBufferException();
        }
        return result;
      }

      public org.apache.flume.channel.file.proto.ProtosFactory.FlumeEvent buildPartial() {
        org.apache.flume.channel.file.proto.ProtosFactory.FlumeEvent result = new org.apache.flume.channel.file.proto.ProtosFactory.FlumeEvent(this);
        int from_bitField0_ = bitField0_;
        int to_bitField0_ = 0;
        if (headersBuilder_ == null) {
          if (((bitField0_ & 0x00000001) == 0x00000001)) {
            headers_ = java.util.Collections.unmodifiableList(headers_);
            bitField0_ = (bitField0_ & ~0x00000001);
          }
          result.headers_ = headers_;
        } else {
          result.headers_ = headersBuilder_.build();
        }
        if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
          to_bitField0_ |= 0x00000001;
        }
        result.body_ = body_;
        result.bitField0_ = to_bitField0_;
        onBuilt();
        return result;
      }

      public Builder mergeFrom(com.google.protobuf.Message other) {
        if (other instanceof org.apache.flume.channel.file.proto.ProtosFactory.FlumeEvent) {
          return mergeFrom((org.apache.flume.channel.file.proto.ProtosFactory.FlumeEvent)other);
        } else {
          super.mergeFrom(other);
          return this;
        }
      }

      public Builder mergeFrom(org.apache.flume.channel.file.proto.ProtosFactory.FlumeEvent other) {
        if (other == org.apache.flume.channel.file.proto.ProtosFactory.FlumeEvent.getDefaultInstance()) return this;
        if (headersBuilder_ == null) {
          if (!other.headers_.isEmpty()) {
            if (headers_.isEmpty()) {
              headers_ = other.headers_;
              bitField0_ = (bitField0_ & ~0x00000001);
            } else {
              ensureHeadersIsMutable();
              headers_.addAll(other.headers_);
            }
            onChanged();
          }
        } else {
          if (!other.headers_.isEmpty()) {
            if (headersBuilder_.isEmpty()) {
              headersBuilder_.dispose();
              headersBuilder_ = null;
              headers_ = other.headers_;
              bitField0_ = (bitField0_ & ~0x00000001);
              headersBuilder_ =
                com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
                   getHeadersFieldBuilder() : null;
            } else {
              headersBuilder_.addAllMessages(other.headers_);
            }
          }
        }
        if (other.hasBody()) {
          setBody(other.getBody());
        }
        this.mergeUnknownFields(other.getUnknownFields());
        return this;
      }

      public final boolean isInitialized() {
        if (!hasBody()) {

          return false;
        }
        for (int i = 0; i < getHeadersCount(); i++) {
          if (!getHeaders(i).isInitialized()) {

            return false;
          }
        }
        return true;
      }

      public Builder mergeFrom(
          com.google.protobuf.CodedInputStream input,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws java.io.IOException {
        com.google.protobuf.UnknownFieldSet.Builder unknownFields =
          com.google.protobuf.UnknownFieldSet.newBuilder(
            this.getUnknownFields());
        while (true) {
          int tag = input.readTag();
          switch (tag) {
            case 0:
              this.setUnknownFields(unknownFields.build());
              onChanged();
              return this;
            default: {
              if (!parseUnknownField(input, unknownFields,
                                     extensionRegistry, tag)) {
                this.setUnknownFields(unknownFields.build());
                onChanged();
                return this;
              }
              break;
            }
            case 10: {
              org.apache.flume.channel.file.proto.ProtosFactory.FlumeEventHeader.Builder subBuilder = org.apache.flume.channel.file.proto.ProtosFactory.FlumeEventHeader.newBuilder();
              input.readMessage(subBuilder, extensionRegistry);
              addHeaders(subBuilder.buildPartial());
              break;
            }
            case 18: {
              bitField0_ |= 0x00000002;
              body_ = input.readBytes();
              break;
            }
          }
        }
      }

      private int bitField0_;

      // repeated .FlumeEventHeader headers = 1;
      private java.util.List<org.apache.flume.channel.file.proto.ProtosFactory.FlumeEventHeader> headers_ =
        java.util.Collections.emptyList();
      private void ensureHeadersIsMutable() {
        if (!((bitField0_ & 0x00000001) == 0x00000001)) {
          headers_ = new java.util.ArrayList<org.apache.flume.channel.file.proto.ProtosFactory.FlumeEventHeader>(headers_);
          bitField0_ |= 0x00000001;
         }
      }

      private com.google.protobuf.RepeatedFieldBuilder<
          org.apache.flume.channel.file.proto.ProtosFactory.FlumeEventHeader, org.apache.flume.channel.file.proto.ProtosFactory.FlumeEventHeader.Builder, org.apache.flume.channel.file.proto.ProtosFactory.FlumeEventHeaderOrBuilder> headersBuilder_;

      public java.util.List<org.apache.flume.channel.file.proto.ProtosFactory.FlumeEventHeader> getHeadersList() {
        if (headersBuilder_ == null) {
          return java.util.Collections.unmodifiableList(headers_);
        } else {
          return headersBuilder_.getMessageList();
        }
      }
      public int getHeadersCount() {
        if (headersBuilder_ == null) {
          return headers_.size();
        } else {
          return headersBuilder_.getCount();
        }
      }
      public org.apache.flume.channel.file.proto.ProtosFactory.FlumeEventHeader getHeaders(int index) {
        if (headersBuilder_ == null) {
          return headers_.get(index);
        } else {
          return headersBuilder_.getMessage(index);
        }
      }
      public Builder setHeaders(
          int index, org.apache.flume.channel.file.proto.ProtosFactory.FlumeEventHeader value) {
        if (headersBuilder_ == null) {
          if (value == null) {
            throw new NullPointerException();
          }
          ensureHeadersIsMutable();
          headers_.set(index, value);
          onChanged();
        } else {
          headersBuilder_.setMessage(index, value);
        }
        return this;
      }
      public Builder setHeaders(
          int index, org.apache.flume.channel.file.proto.ProtosFactory.FlumeEventHeader.Builder builderForValue) {
        if (headersBuilder_ == null) {
          ensureHeadersIsMutable();
          headers_.set(index, builderForValue.build());
          onChanged();
        } else {
          headersBuilder_.setMessage(index, builderForValue.build());
        }
        return this;
      }
      public Builder addHeaders(org.apache.flume.channel.file.proto.ProtosFactory.FlumeEventHeader value) {
        if (headersBuilder_ == null) {
          if (value == null) {
            throw new NullPointerException();
          }
          ensureHeadersIsMutable();
          headers_.add(value);
          onChanged();
        } else {
          headersBuilder_.addMessage(value);
        }
        return this;
      }
      public Builder addHeaders(
          int index, org.apache.flume.channel.file.proto.ProtosFactory.FlumeEventHeader value) {
        if (headersBuilder_ == null) {
          if (value == null) {
            throw new NullPointerException();
          }
          ensureHeadersIsMutable();
          headers_.add(index, value);
          onChanged();
        } else {
          headersBuilder_.addMessage(index, value);
        }
        return this;
      }
      public Builder addHeaders(
          org.apache.flume.channel.file.proto.ProtosFactory.FlumeEventHeader.Builder builderForValue) {
        if (headersBuilder_ == null) {
          ensureHeadersIsMutable();
          headers_.add(builderForValue.build());
          onChanged();
        } else {
          headersBuilder_.addMessage(builderForValue.build());
        }
        return this;
      }
      public Builder addHeaders(
          int index, org.apache.flume.channel.file.proto.ProtosFactory.FlumeEventHeader.Builder builderForValue) {
        if (headersBuilder_ == null) {
          ensureHeadersIsMutable();
          headers_.add(index, builderForValue.build());
          onChanged();
        } else {
          headersBuilder_.addMessage(index, builderForValue.build());
        }
        return this;
      }
      public Builder addAllHeaders(
          java.lang.Iterable<? extends org.apache.flume.channel.file.proto.ProtosFactory.FlumeEventHeader> values) {
        if (headersBuilder_ == null) {
          ensureHeadersIsMutable();
          super.addAll(values, headers_);
          onChanged();
        } else {
          headersBuilder_.addAllMessages(values);
        }
        return this;
      }
      public Builder clearHeaders() {
        if (headersBuilder_ == null) {
          headers_ = java.util.Collections.emptyList();
          bitField0_ = (bitField0_ & ~0x00000001);
          onChanged();
        } else {
          headersBuilder_.clear();
        }
        return this;
      }
      public Builder removeHeaders(int index) {
        if (headersBuilder_ == null) {
          ensureHeadersIsMutable();
          headers_.remove(index);
          onChanged();
        } else {
          headersBuilder_.remove(index);
        }
        return this;
      }
      public org.apache.flume.channel.file.proto.ProtosFactory.FlumeEventHeader.Builder getHeadersBuilder(
          int index) {
        return getHeadersFieldBuilder().getBuilder(index);
      }
      public org.apache.flume.channel.file.proto.ProtosFactory.FlumeEventHeaderOrBuilder getHeadersOrBuilder(
          int index) {
        if (headersBuilder_ == null) {
          return headers_.get(index);  } else {
          return headersBuilder_.getMessageOrBuilder(index);
        }
      }
      public java.util.List<? extends org.apache.flume.channel.file.proto.ProtosFactory.FlumeEventHeaderOrBuilder>
           getHeadersOrBuilderList() {
        if (headersBuilder_ != null) {
          return headersBuilder_.getMessageOrBuilderList();
        } else {
          return java.util.Collections.unmodifiableList(headers_);
        }
      }
      public org.apache.flume.channel.file.proto.ProtosFactory.FlumeEventHeader.Builder addHeadersBuilder() {
        return getHeadersFieldBuilder().addBuilder(
            org.apache.flume.channel.file.proto.ProtosFactory.FlumeEventHeader.getDefaultInstance());
      }
      public org.apache.flume.channel.file.proto.ProtosFactory.FlumeEventHeader.Builder addHeadersBuilder(
          int index) {
        return getHeadersFieldBuilder().addBuilder(
            index, org.apache.flume.channel.file.proto.ProtosFactory.FlumeEventHeader.getDefaultInstance());
      }
      public java.util.List<org.apache.flume.channel.file.proto.ProtosFactory.FlumeEventHeader.Builder>
           getHeadersBuilderList() {
        return getHeadersFieldBuilder().getBuilderList();
      }
      private com.google.protobuf.RepeatedFieldBuilder<
          org.apache.flume.channel.file.proto.ProtosFactory.FlumeEventHeader, org.apache.flume.channel.file.proto.ProtosFactory.FlumeEventHeader.Builder, org.apache.flume.channel.file.proto.ProtosFactory.FlumeEventHeaderOrBuilder>
          getHeadersFieldBuilder() {
        if (headersBuilder_ == null) {
          headersBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
              org.apache.flume.channel.file.proto.ProtosFactory.FlumeEventHeader, org.apache.flume.channel.file.proto.ProtosFactory.FlumeEventHeader.Builder, org.apache.flume.channel.file.proto.ProtosFactory.FlumeEventHeaderOrBuilder>(
                  headers_,
                  ((bitField0_ & 0x00000001) == 0x00000001),
                  getParentForChildren(),
                  isClean());
          headers_ = null;
        }
        return headersBuilder_;
      }

      // required bytes body = 2;
      private com.google.protobuf.ByteString body_ = com.google.protobuf.ByteString.EMPTY;
      public boolean hasBody() {
        return ((bitField0_ & 0x00000002) == 0x00000002);
      }
      public com.google.protobuf.ByteString getBody() {
        return body_;
      }
      public Builder setBody(com.google.protobuf.ByteString value) {
        if (value == null) {
    throw new NullPointerException();
  }
  bitField0_ |= 0x00000002;
        body_ = value;
        onChanged();
        return this;
      }
      public Builder clearBody() {
        bitField0_ = (bitField0_ & ~0x00000002);
        body_ = getDefaultInstance().getBody();
        onChanged();
        return this;
      }

      // @@protoc_insertion_point(builder_scope:FlumeEvent)
    }

    static {
      defaultInstance = new FlumeEvent(true);
      defaultInstance.initFields();
    }

    // @@protoc_insertion_point(class_scope:FlumeEvent)
  }

  public interface FlumeEventHeaderOrBuilder
      extends com.google.protobuf.MessageOrBuilder {

    // required string key = 1;
    boolean hasKey();
    String getKey();

    // required string value = 2;
    boolean hasValue();
    String getValue();
  }
  public static final class FlumeEventHeader extends
      com.google.protobuf.GeneratedMessage
      implements FlumeEventHeaderOrBuilder {
    // Use FlumeEventHeader.newBuilder() to construct.
    private FlumeEventHeader(Builder builder) {
      super(builder);
    }
    private FlumeEventHeader(boolean noInit) {}

    private static final FlumeEventHeader defaultInstance;
    public static FlumeEventHeader getDefaultInstance() {
      return defaultInstance;
    }

    public FlumeEventHeader getDefaultInstanceForType() {
      return defaultInstance;
    }

    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return org.apache.flume.channel.file.proto.ProtosFactory.internal_static_FlumeEventHeader_descriptor;
    }

    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return org.apache.flume.channel.file.proto.ProtosFactory.internal_static_FlumeEventHeader_fieldAccessorTable;
    }

    private int bitField0_;
    // required string key = 1;
    public static final int KEY_FIELD_NUMBER = 1;
    private java.lang.Object key_;
    public boolean hasKey() {
      return ((bitField0_ & 0x00000001) == 0x00000001);
    }
    public String getKey() {
      java.lang.Object ref = key_;
      if (ref instanceof String) {
        return (String) ref;
      } else {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        String s = bs.toStringUtf8();
        if (com.google.protobuf.Internal.isValidUtf8(bs)) {
          key_ = s;
        }
        return s;
      }
    }
    private com.google.protobuf.ByteString getKeyBytes() {
      java.lang.Object ref = key_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b =
            com.google.protobuf.ByteString.copyFromUtf8((String) ref);
        key_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }

    // required string value = 2;
    public static final int VALUE_FIELD_NUMBER = 2;
    private java.lang.Object value_;
    public boolean hasValue() {
      return ((bitField0_ & 0x00000002) == 0x00000002);
    }
    public String getValue() {
      java.lang.Object ref = value_;
      if (ref instanceof String) {
        return (String) ref;
      } else {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        String s = bs.toStringUtf8();
        if (com.google.protobuf.Internal.isValidUtf8(bs)) {
          value_ = s;
        }
        return s;
      }
    }
    private com.google.protobuf.ByteString getValueBytes() {
      java.lang.Object ref = value_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b =
            com.google.protobuf.ByteString.copyFromUtf8((String) ref);
        value_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }

    private void initFields() {
      key_ = "";
      value_ = "";
    }
    private byte memoizedIsInitialized = -1;
    public final boolean isInitialized() {
      byte isInitialized = memoizedIsInitialized;
      if (isInitialized != -1) return isInitialized == 1;

      if (!hasKey()) {
        memoizedIsInitialized = 0;
        return false;
      }
      if (!hasValue()) {
        memoizedIsInitialized = 0;
        return false;
      }
      memoizedIsInitialized = 1;
      return true;
    }

    public void writeTo(com.google.protobuf.CodedOutputStream output)
                        throws java.io.IOException {
      getSerializedSize();
      if (((bitField0_ & 0x00000001) == 0x00000001)) {
        output.writeBytes(1, getKeyBytes());
      }
      if (((bitField0_ & 0x00000002) == 0x00000002)) {
        output.writeBytes(2, getValueBytes());
      }
      getUnknownFields().writeTo(output);
    }

    private int memoizedSerializedSize = -1;
    public int getSerializedSize() {
      int size = memoizedSerializedSize;
      if (size != -1) return size;

      size = 0;
      if (((bitField0_ & 0x00000001) == 0x00000001)) {
        size += com.google.protobuf.CodedOutputStream
          .computeBytesSize(1, getKeyBytes());
      }
      if (((bitField0_ & 0x00000002) == 0x00000002)) {
        size += com.google.protobuf.CodedOutputStream
          .computeBytesSize(2, getValueBytes());
      }
      size += getUnknownFields().getSerializedSize();
      memoizedSerializedSize = size;
      return size;
    }

    private static final long serialVersionUID = 0L;
    @java.lang.Override
    protected java.lang.Object writeReplace()
        throws java.io.ObjectStreamException {
      return super.writeReplace();
    }

    public static org.apache.flume.channel.file.proto.ProtosFactory.FlumeEventHeader parseFrom(
        com.google.protobuf.ByteString data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return newBuilder().mergeFrom(data).buildParsed();
    }
    public static org.apache.flume.channel.file.proto.ProtosFactory.FlumeEventHeader parseFrom(
        com.google.protobuf.ByteString data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return newBuilder().mergeFrom(data, extensionRegistry)
               .buildParsed();
    }
    public static org.apache.flume.channel.file.proto.ProtosFactory.FlumeEventHeader parseFrom(byte[] data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return newBuilder().mergeFrom(data).buildParsed();
    }
    public static org.apache.flume.channel.file.proto.ProtosFactory.FlumeEventHeader parseFrom(
        byte[] data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return newBuilder().mergeFrom(data, extensionRegistry)
               .buildParsed();
    }
    public static org.apache.flume.channel.file.proto.ProtosFactory.FlumeEventHeader parseFrom(java.io.InputStream input)
        throws java.io.IOException {
      return newBuilder().mergeFrom(input).buildParsed();
    }
    public static org.apache.flume.channel.file.proto.ProtosFactory.FlumeEventHeader parseFrom(
        java.io.InputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return newBuilder().mergeFrom(input, extensionRegistry)
               .buildParsed();
    }
    public static org.apache.flume.channel.file.proto.ProtosFactory.FlumeEventHeader parseDelimitedFrom(java.io.InputStream input)
        throws java.io.IOException {
      Builder builder = newBuilder();
      if (builder.mergeDelimitedFrom(input)) {
        return builder.buildParsed();
      } else {
        return null;
      }
    }
    public static org.apache.flume.channel.file.proto.ProtosFactory.FlumeEventHeader parseDelimitedFrom(
        java.io.InputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      Builder builder = newBuilder();
      if (builder.mergeDelimitedFrom(input, extensionRegistry)) {
        return builder.buildParsed();
      } else {
        return null;
      }
    }
    public static org.apache.flume.channel.file.proto.ProtosFactory.FlumeEventHeader parseFrom(
        com.google.protobuf.CodedInputStream input)
        throws java.io.IOException {
      return newBuilder().mergeFrom(input).buildParsed();
    }
    public static org.apache.flume.channel.file.proto.ProtosFactory.FlumeEventHeader parseFrom(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return newBuilder().mergeFrom(input, extensionRegistry)
               .buildParsed();
    }

    public static Builder newBuilder() { return Builder.create(); }
    public Builder newBuilderForType() { return newBuilder(); }
    public static Builder newBuilder(org.apache.flume.channel.file.proto.ProtosFactory.FlumeEventHeader prototype) {
      return newBuilder().mergeFrom(prototype);
    }
    public Builder toBuilder() { return newBuilder(this); }

    @java.lang.Override
    protected Builder newBuilderForType(
        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
      Builder builder = new Builder(parent);
      return builder;
    }
    public static final class Builder extends
        com.google.protobuf.GeneratedMessage.Builder<Builder>
       implements org.apache.flume.channel.file.proto.ProtosFactory.FlumeEventHeaderOrBuilder {
      public static final com.google.protobuf.Descriptors.Descriptor
          getDescriptor() {
        return org.apache.flume.channel.file.proto.ProtosFactory.internal_static_FlumeEventHeader_descriptor;
      }

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
          internalGetFieldAccessorTable() {
        return org.apache.flume.channel.file.proto.ProtosFactory.internal_static_FlumeEventHeader_fieldAccessorTable;
      }

      // Construct using org.apache.flume.channel.file.proto.ProtosFactory.FlumeEventHeader.newBuilder()
      private Builder() {
        maybeForceBuilderInitialization();
      }

      private Builder(BuilderParent parent) {
        super(parent);
        maybeForceBuilderInitialization();
      }
      private void maybeForceBuilderInitialization() {
        if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
        }
      }
      private static Builder create() {
        return new Builder();
      }

      public Builder clear() {
        super.clear();
        key_ = "";
        bitField0_ = (bitField0_ & ~0x00000001);
        value_ = "";
        bitField0_ = (bitField0_ & ~0x00000002);
        return this;
      }

      public Builder clone() {
        return create().mergeFrom(buildPartial());
      }

      public com.google.protobuf.Descriptors.Descriptor
          getDescriptorForType() {
        return org.apache.flume.channel.file.proto.ProtosFactory.FlumeEventHeader.getDescriptor();
      }

      public org.apache.flume.channel.file.proto.ProtosFactory.FlumeEventHeader getDefaultInstanceForType() {
        return org.apache.flume.channel.file.proto.ProtosFactory.FlumeEventHeader.getDefaultInstance();
      }

      public org.apache.flume.channel.file.proto.ProtosFactory.FlumeEventHeader build() {
        org.apache.flume.channel.file.proto.ProtosFactory.FlumeEventHeader result = buildPartial();
        if (!result.isInitialized()) {
          throw newUninitializedMessageException(result);
        }
        return result;
      }

      private org.apache.flume.channel.file.proto.ProtosFactory.FlumeEventHeader buildParsed()
          throws com.google.protobuf.InvalidProtocolBufferException {
        org.apache.flume.channel.file.proto.ProtosFactory.FlumeEventHeader result = buildPartial();
        if (!result.isInitialized()) {
          throw newUninitializedMessageException(
            result).asInvalidProtocolBufferException();
        }
        return result;
      }

      public org.apache.flume.channel.file.proto.ProtosFactory.FlumeEventHeader buildPartial() {
        org.apache.flume.channel.file.proto.ProtosFactory.FlumeEventHeader result = new org.apache.flume.channel.file.proto.ProtosFactory.FlumeEventHeader(this);
        int from_bitField0_ = bitField0_;
        int to_bitField0_ = 0;
        if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
          to_bitField0_ |= 0x00000001;
        }
        result.key_ = key_;
        if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
          to_bitField0_ |= 0x00000002;
        }
        result.value_ = value_;
        result.bitField0_ = to_bitField0_;
        onBuilt();
        return result;
      }

      public Builder mergeFrom(com.google.protobuf.Message other) {
        if (other instanceof org.apache.flume.channel.file.proto.ProtosFactory.FlumeEventHeader) {
          return mergeFrom((org.apache.flume.channel.file.proto.ProtosFactory.FlumeEventHeader)other);
        } else {
          super.mergeFrom(other);
          return this;
        }
      }

      public Builder mergeFrom(org.apache.flume.channel.file.proto.ProtosFactory.FlumeEventHeader other) {
        if (other == org.apache.flume.channel.file.proto.ProtosFactory.FlumeEventHeader.getDefaultInstance()) return this;
        if (other.hasKey()) {
          setKey(other.getKey());
        }
        if (other.hasValue()) {
          setValue(other.getValue());
        }
        this.mergeUnknownFields(other.getUnknownFields());
        return this;
      }

      public final boolean isInitialized() {
        if (!hasKey()) {

          return false;
        }
        if (!hasValue()) {

          return false;
        }
        return true;
      }

      public Builder mergeFrom(
          com.google.protobuf.CodedInputStream input,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws java.io.IOException {
        com.google.protobuf.UnknownFieldSet.Builder unknownFields =
          com.google.protobuf.UnknownFieldSet.newBuilder(
            this.getUnknownFields());
        while (true) {
          int tag = input.readTag();
          switch (tag) {
            case 0:
              this.setUnknownFields(unknownFields.build());
              onChanged();
              return this;
            default: {
              if (!parseUnknownField(input, unknownFields,
                                     extensionRegistry, tag)) {
                this.setUnknownFields(unknownFields.build());
                onChanged();
                return this;
              }
              break;
            }
            case 10: {
              bitField0_ |= 0x00000001;
              key_ = input.readBytes();
              break;
            }
            case 18: {
              bitField0_ |= 0x00000002;
              value_ = input.readBytes();
              break;
            }
          }
        }
      }

      private int bitField0_;

      // required string key = 1;
      private java.lang.Object key_ = "";
      public boolean hasKey() {
        return ((bitField0_ & 0x00000001) == 0x00000001);
      }
      public String getKey() {
        java.lang.Object ref = key_;
        if (!(ref instanceof String)) {
          String s = ((com.google.protobuf.ByteString) ref).toStringUtf8();
          key_ = s;
          return s;
        } else {
          return (String) ref;
        }
      }
      public Builder setKey(String value) {
        if (value == null) {
    throw new NullPointerException();
  }
  bitField0_ |= 0x00000001;
        key_ = value;
        onChanged();
        return this;
      }
      public Builder clearKey() {
        bitField0_ = (bitField0_ & ~0x00000001);
        key_ = getDefaultInstance().getKey();
        onChanged();
        return this;
      }
      void setKey(com.google.protobuf.ByteString value) {
        bitField0_ |= 0x00000001;
        key_ = value;
        onChanged();
      }

      // required string value = 2;
      private java.lang.Object value_ = "";
      public boolean hasValue() {
        return ((bitField0_ & 0x00000002) == 0x00000002);
      }
      public String getValue() {
        java.lang.Object ref = value_;
        if (!(ref instanceof String)) {
          String s = ((com.google.protobuf.ByteString) ref).toStringUtf8();
          value_ = s;
          return s;
        } else {
          return (String) ref;
        }
      }
      public Builder setValue(String value) {
        if (value == null) {
    throw new NullPointerException();
  }
  bitField0_ |= 0x00000002;
        value_ = value;
        onChanged();
        return this;
      }
      public Builder clearValue() {
        bitField0_ = (bitField0_ & ~0x00000002);
        value_ = getDefaultInstance().getValue();
        onChanged();
        return this;
      }
      void setValue(com.google.protobuf.ByteString value) {
        bitField0_ |= 0x00000002;
        value_ = value;
        onChanged();
      }

      // @@protoc_insertion_point(builder_scope:FlumeEventHeader)
    }

    static {
      defaultInstance = new FlumeEventHeader(true);
      defaultInstance.initFields();
    }

    // @@protoc_insertion_point(class_scope:FlumeEventHeader)
  }

  private static com.google.protobuf.Descriptors.Descriptor
    internal_static_Checkpoint_descriptor;
  private static
    com.google.protobuf.GeneratedMessage.FieldAccessorTable
      internal_static_Checkpoint_fieldAccessorTable;
  private static com.google.protobuf.Descriptors.Descriptor
    internal_static_ActiveLog_descriptor;
  private static
    com.google.protobuf.GeneratedMessage.FieldAccessorTable
      internal_static_ActiveLog_fieldAccessorTable;
  private static com.google.protobuf.Descriptors.Descriptor
    internal_static_LogFileMetaData_descriptor;
  private static
    com.google.protobuf.GeneratedMessage.FieldAccessorTable
      internal_static_LogFileMetaData_fieldAccessorTable;
  private static com.google.protobuf.Descriptors.Descriptor
    internal_static_LogFileEncryption_descriptor;
  private static
    com.google.protobuf.GeneratedMessage.FieldAccessorTable
      internal_static_LogFileEncryption_fieldAccessorTable;
  private static com.google.protobuf.Descriptors.Descriptor
    internal_static_TransactionEventHeader_descriptor;
  private static
    com.google.protobuf.GeneratedMessage.FieldAccessorTable
      internal_static_TransactionEventHeader_fieldAccessorTable;
  private static com.google.protobuf.Descriptors.Descriptor
    internal_static_Put_descriptor;
  private static
    com.google.protobuf.GeneratedMessage.FieldAccessorTable
      internal_static_Put_fieldAccessorTable;
  private static com.google.protobuf.Descriptors.Descriptor
    internal_static_Take_descriptor;
  private static
    com.google.protobuf.GeneratedMessage.FieldAccessorTable
      internal_static_Take_fieldAccessorTable;
  private static com.google.protobuf.Descriptors.Descriptor
    internal_static_Rollback_descriptor;
  private static
    com.google.protobuf.GeneratedMessage.FieldAccessorTable
      internal_static_Rollback_fieldAccessorTable;
  private static com.google.protobuf.Descriptors.Descriptor
    internal_static_Commit_descriptor;
  private static
    com.google.protobuf.GeneratedMessage.FieldAccessorTable
      internal_static_Commit_fieldAccessorTable;
  private static com.google.protobuf.Descriptors.Descriptor
    internal_static_TransactionEventFooter_descriptor;
  private static
    com.google.protobuf.GeneratedMessage.FieldAccessorTable
      internal_static_TransactionEventFooter_fieldAccessorTable;
  private static com.google.protobuf.Descriptors.Descriptor
    internal_static_FlumeEvent_descriptor;
  private static
    com.google.protobuf.GeneratedMessage.FieldAccessorTable
      internal_static_FlumeEvent_fieldAccessorTable;
  private static com.google.protobuf.Descriptors.Descriptor
    internal_static_FlumeEventHeader_descriptor;
  private static
    com.google.protobuf.GeneratedMessage.FieldAccessorTable
      internal_static_FlumeEventHeader_fieldAccessorTable;

  public static com.google.protobuf.Descriptors.FileDescriptor
      getDescriptor() {
    return descriptor;
  }
  private static com.google.protobuf.Descriptors.FileDescriptor
      descriptor;
  static {
    java.lang.String[] descriptorData = {
      "\n\021filechannel.proto\"y\n\nCheckpoint\022\017\n\007ver" +
      "sion\030\001 \002(\017\022\024\n\014writeOrderID\030\002 \002(\020\022\021\n\tqueu" +
      "eSize\030\003 \002(\017\022\021\n\tqueueHead\030\004 \002(\017\022\036\n\nactive" +
      "Logs\030\005 \003(\0132\n.ActiveLog\"-\n\tActiveLog\022\021\n\tl" +
      "ogFileID\030\001 \002(\017\022\r\n\005count\030\002 \002(\017\"\231\001\n\017LogFil" +
      "eMetaData\022\017\n\007version\030\001 \002(\017\022\021\n\tlogFileID\030" +
      "\002 \002(\017\022\032\n\022checkpointPosition\030\003 \002(\020\022\036\n\026che" +
      "ckpointWriteOrderID\030\004 \002(\020\022&\n\nencryption\030" +
      "\005 \001(\0132\022.LogFileEncryption\"Q\n\021LogFileEncr" +
      "yption\022\026\n\016cipherProvider\030\001 \002(\t\022\020\n\010keyAli",
      "as\030\002 \002(\t\022\022\n\nparameters\030\003 \001(\014\"S\n\026Transact" +
      "ionEventHeader\022\014\n\004type\030\001 \002(\017\022\025\n\rtransact" +
      "ionID\030\002 \002(\020\022\024\n\014writeOrderID\030\003 \002(\020\"!\n\003Put" +
      "\022\032\n\005event\030\001 \002(\0132\013.FlumeEvent\"&\n\004Take\022\016\n\006" +
      "fileID\030\001 \002(\017\022\016\n\006offset\030\002 \002(\017\"\n\n\010Rollback" +
      "\"\026\n\006Commit\022\014\n\004type\030\001 \002(\017\"\030\n\026TransactionE" +
      "ventFooter\">\n\nFlumeEvent\022\"\n\007headers\030\001 \003(" +
      "\0132\021.FlumeEventHeader\022\014\n\004body\030\002 \002(\014\".\n\020Fl" +
      "umeEventHeader\022\013\n\003key\030\001 \002(\t\022\r\n\005value\030\002 \002" +
      "(\tB4\n#org.apache.flume.channel.file.prot",
      "oB\rProtosFactory"
    };
    com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner =
      new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() {
        public com.google.protobuf.ExtensionRegistry assignDescriptors(
            com.google.protobuf.Descriptors.FileDescriptor root) {
          descriptor = root;
          internal_static_Checkpoint_descriptor =
            getDescriptor().getMessageTypes().get(0);
          internal_static_Checkpoint_fieldAccessorTable = new
            com.google.protobuf.GeneratedMessage.FieldAccessorTable(
              internal_static_Checkpoint_descriptor,
              new java.lang.String[] { "Version", "WriteOrderID", "QueueSize", "QueueHead", "ActiveLogs", },
              org.apache.flume.channel.file.proto.ProtosFactory.Checkpoint.class,
              org.apache.flume.channel.file.proto.ProtosFactory.Checkpoint.Builder.class);
          internal_static_ActiveLog_descriptor =
            getDescriptor().getMessageTypes().get(1);
          internal_static_ActiveLog_fieldAccessorTable = new
            com.google.protobuf.GeneratedMessage.FieldAccessorTable(
              internal_static_ActiveLog_descriptor,
              new java.lang.String[] { "LogFileID", "Count", },
              org.apache.flume.channel.file.proto.ProtosFactory.ActiveLog.class,
              org.apache.flume.channel.file.proto.ProtosFactory.ActiveLog.Builder.class);
          internal_static_LogFileMetaData_descriptor =
            getDescriptor().getMessageTypes().get(2);
          internal_static_LogFileMetaData_fieldAccessorTable = new
            com.google.protobuf.GeneratedMessage.FieldAccessorTable(
              internal_static_LogFileMetaData_descriptor,
              new java.lang.String[] { "Version", "LogFileID", "CheckpointPosition", "CheckpointWriteOrderID", "Encryption", },
              org.apache.flume.channel.file.proto.ProtosFactory.LogFileMetaData.class,
              org.apache.flume.channel.file.proto.ProtosFactory.LogFileMetaData.Builder.class);
          internal_static_LogFileEncryption_descriptor =
            getDescriptor().getMessageTypes().get(3);
          internal_static_LogFileEncryption_fieldAccessorTable = new
            com.google.protobuf.GeneratedMessage.FieldAccessorTable(
              internal_static_LogFileEncryption_descriptor,
              new java.lang.String[] { "CipherProvider", "KeyAlias", "Parameters", },
              org.apache.flume.channel.file.proto.ProtosFactory.LogFileEncryption.class,
              org.apache.flume.channel.file.proto.ProtosFactory.LogFileEncryption.Builder.class);
          internal_static_TransactionEventHeader_descriptor =
            getDescriptor().getMessageTypes().get(4);
          internal_static_TransactionEventHeader_fieldAccessorTable = new
            com.google.protobuf.GeneratedMessage.FieldAccessorTable(
              internal_static_TransactionEventHeader_descriptor,
              new java.lang.String[] { "Type", "TransactionID", "WriteOrderID", },
              org.apache.flume.channel.file.proto.ProtosFactory.TransactionEventHeader.class,
              org.apache.flume.channel.file.proto.ProtosFactory.TransactionEventHeader.Builder.class);
          internal_static_Put_descriptor =
            getDescriptor().getMessageTypes().get(5);
          internal_static_Put_fieldAccessorTable = new
            com.google.protobuf.GeneratedMessage.FieldAccessorTable(
              internal_static_Put_descriptor,
              new java.lang.String[] { "Event", },
              org.apache.flume.channel.file.proto.ProtosFactory.Put.class,
              org.apache.flume.channel.file.proto.ProtosFactory.Put.Builder.class);
          internal_static_Take_descriptor =
            getDescriptor().getMessageTypes().get(6);
          internal_static_Take_fieldAccessorTable = new
            com.google.protobuf.GeneratedMessage.FieldAccessorTable(
              internal_static_Take_descriptor,
              new java.lang.String[] { "FileID", "Offset", },
              org.apache.flume.channel.file.proto.ProtosFactory.Take.class,
              org.apache.flume.channel.file.proto.ProtosFactory.Take.Builder.class);
          internal_static_Rollback_descriptor =
            getDescriptor().getMessageTypes().get(7);
          internal_static_Rollback_fieldAccessorTable = new
            com.google.protobuf.GeneratedMessage.FieldAccessorTable(
              internal_static_Rollback_descriptor,
              new java.lang.String[] { },
              org.apache.flume.channel.file.proto.ProtosFactory.Rollback.class,
              org.apache.flume.channel.file.proto.ProtosFactory.Rollback.Builder.class);
          internal_static_Commit_descriptor =
            getDescriptor().getMessageTypes().get(8);
          internal_static_Commit_fieldAccessorTable = new
            com.google.protobuf.GeneratedMessage.FieldAccessorTable(
              internal_static_Commit_descriptor,
              new java.lang.String[] { "Type", },
              org.apache.flume.channel.file.proto.ProtosFactory.Commit.class,
              org.apache.flume.channel.file.proto.ProtosFactory.Commit.Builder.class);
          internal_static_TransactionEventFooter_descriptor =
            getDescriptor().getMessageTypes().get(9);
          internal_static_TransactionEventFooter_fieldAccessorTable = new
            com.google.protobuf.GeneratedMessage.FieldAccessorTable(
              internal_static_TransactionEventFooter_descriptor,
              new java.lang.String[] { },
              org.apache.flume.channel.file.proto.ProtosFactory.TransactionEventFooter.class,
              org.apache.flume.channel.file.proto.ProtosFactory.TransactionEventFooter.Builder.class);
          internal_static_FlumeEvent_descriptor =
            getDescriptor().getMessageTypes().get(10);
          internal_static_FlumeEvent_fieldAccessorTable = new
            com.google.protobuf.GeneratedMessage.FieldAccessorTable(
              internal_static_FlumeEvent_descriptor,
              new java.lang.String[] { "Headers", "Body", },
              org.apache.flume.channel.file.proto.ProtosFactory.FlumeEvent.class,
              org.apache.flume.channel.file.proto.ProtosFactory.FlumeEvent.Builder.class);
          internal_static_FlumeEventHeader_descriptor =
            getDescriptor().getMessageTypes().get(11);
          internal_static_FlumeEventHeader_fieldAccessorTable = new
            com.google.protobuf.GeneratedMessage.FieldAccessorTable(
              internal_static_FlumeEventHeader_descriptor,
              new java.lang.String[] { "Key", "Value", },
              org.apache.flume.channel.file.proto.ProtosFactory.FlumeEventHeader.class,
              org.apache.flume.channel.file.proto.ProtosFactory.FlumeEventHeader.Builder.class);
          return null;
        }
      };
    com.google.protobuf.Descriptors.FileDescriptor
      .internalBuildGeneratedFileFrom(descriptorData,
        new com.google.protobuf.Descriptors.FileDescriptor[] {
        }, assigner);
  }

  // @@protoc_insertion_point(outer_class_scope)
}
